pub struct Tsc<'d, T: Instance, K: PeriMode> { /* private fields */ }
Expand description
TSC driver
Implementations§
Source§impl<'d, T: Instance> Tsc<'d, T, Async>
impl<'d, T: Instance> Tsc<'d, T, Async>
Sourcepub fn new_async(
peri: impl Peripheral<P = T> + 'd,
g1: Option<PinGroup<'d, T, G1>>,
g2: Option<PinGroup<'d, T, G2>>,
g3: Option<PinGroup<'d, T, G3>>,
g4: Option<PinGroup<'d, T, G4>>,
g5: Option<PinGroup<'d, T, G5>>,
g6: Option<PinGroup<'d, T, G6>>,
g7: Option<PinGroup<'d, T, G7>>,
config: Config,
_irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd,
) -> Self
pub fn new_async( peri: impl Peripheral<P = T> + 'd, g1: Option<PinGroup<'d, T, G1>>, g2: Option<PinGroup<'d, T, G2>>, g3: Option<PinGroup<'d, T, G3>>, g4: Option<PinGroup<'d, T, G4>>, g5: Option<PinGroup<'d, T, G5>>, g6: Option<PinGroup<'d, T, G6>>, g7: Option<PinGroup<'d, T, G7>>, config: Config, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, ) -> Self
Create a Tsc instance that can be awaited for completion
Sourcepub async fn pend_for_acquisition(&mut self)
pub async fn pend_for_acquisition(&mut self)
Asyncronously wait for the end of an acquisition
Source§impl<'d, T: Instance> Tsc<'d, T, Blocking>
impl<'d, T: Instance> Tsc<'d, T, Blocking>
Sourcepub fn new_blocking(
peri: impl Peripheral<P = T> + 'd,
g1: Option<PinGroup<'d, T, G1>>,
g2: Option<PinGroup<'d, T, G2>>,
g3: Option<PinGroup<'d, T, G3>>,
g4: Option<PinGroup<'d, T, G4>>,
g5: Option<PinGroup<'d, T, G5>>,
g6: Option<PinGroup<'d, T, G6>>,
g7: Option<PinGroup<'d, T, G7>>,
config: Config,
) -> Self
pub fn new_blocking( peri: impl Peripheral<P = T> + 'd, g1: Option<PinGroup<'d, T, G1>>, g2: Option<PinGroup<'d, T, G2>>, g3: Option<PinGroup<'d, T, G3>>, g4: Option<PinGroup<'d, T, G4>>, g5: Option<PinGroup<'d, T, G5>>, g6: Option<PinGroup<'d, T, G6>>, g7: Option<PinGroup<'d, T, G7>>, config: Config, ) -> Self
Create a Tsc instance that must be polled for completion
Sourcepub fn poll_for_acquisition(&mut self)
pub fn poll_for_acquisition(&mut self)
Wait for end of acquisition
Source§impl<'d, T: Instance, K: PeriMode> Tsc<'d, T, K>
impl<'d, T: Instance, K: PeriMode> Tsc<'d, T, K>
Sourcepub fn group_get_status(&mut self, index: Group) -> GroupStatus
pub fn group_get_status(&mut self, index: Group) -> GroupStatus
Get the individual group status to check acquisition complete
Sourcepub fn group_get_value(&mut self, index: Group) -> u16
pub fn group_get_value(&mut self, index: Group) -> u16
Get the count for the acquisiton, valid once group status is set
Sourcepub fn discharge_io(&mut self, status: bool)
pub fn discharge_io(&mut self, status: bool)
Discharge the IOs for subsequent acquisition
Trait Implementations§
Auto Trait Implementations§
impl<'d, T, K> Freeze for Tsc<'d, T, K>where
T: Freeze,
impl<'d, T, K> RefUnwindSafe for Tsc<'d, T, K>where
T: RefUnwindSafe,
K: RefUnwindSafe,
impl<'d, T, K> Send for Tsc<'d, T, K>
impl<'d, T, K> Sync for Tsc<'d, T, K>
impl<'d, T, K> Unpin for Tsc<'d, T, K>
impl<'d, T, K> !UnwindSafe for Tsc<'d, T, K>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more