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>>,
g8: Option<PinGroup<'d, T, G8>>,
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>>, g8: Option<PinGroup<'d, T, G8>>, 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>>,
g8: Option<PinGroup<'d, T, G8>>,
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>>, g8: Option<PinGroup<'d, T, G8>>, 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