pub struct Tsc<SPIN> { /* private fields */ }Implementations§
Source§impl<SPIN> Tsc<SPIN>
impl<SPIN> Tsc<SPIN>
pub fn tsc( tsc: TSC, sample_pin: SPIN, ahb: &mut AHB1, cfg: Option<Config>, ) -> Self
Sourcepub fn start<PIN>(&self, _input: &mut PIN)where
PIN: ChannelPin<TSC>,
pub fn start<PIN>(&self, _input: &mut PIN)where
PIN: ChannelPin<TSC>,
Starts a charge acquisition
Sourcepub fn acquire<PIN>(&self, input: &mut PIN) -> Result<u16, Error>where
PIN: ChannelPin<TSC>,
pub fn acquire<PIN>(&self, input: &mut PIN) -> Result<u16, Error>where
PIN: ChannelPin<TSC>,
Blocks waiting for a acquisition to complete or for a Max Count Error
Sourcepub fn read<PIN>(&self, _input: &mut PIN) -> Result<u16, Error>where
PIN: ChannelPin<TSC>,
pub fn read<PIN>(&self, _input: &mut PIN) -> Result<u16, Error>where
PIN: ChannelPin<TSC>,
Reads the tsc group 2 count register
Sourcepub fn read_unchecked(&self) -> u16
pub fn read_unchecked(&self) -> u16
Reads the tsc group 2 count register WARNING, just returns the contents of the register! No validation of the correct pin
Sourcepub fn in_progress(&mut self) -> bool
pub fn in_progress(&mut self) -> bool
Is the tsc performing an aquisition
Auto Trait Implementations§
impl<SPIN> Freeze for Tsc<SPIN>where
SPIN: Freeze,
impl<SPIN> RefUnwindSafe for Tsc<SPIN>where
SPIN: RefUnwindSafe,
impl<SPIN> Send for Tsc<SPIN>where
SPIN: Send,
impl<SPIN> !Sync for Tsc<SPIN>
impl<SPIN> Unpin for Tsc<SPIN>where
SPIN: Unpin,
impl<SPIN> UnwindSafe for Tsc<SPIN>where
SPIN: UnwindSafe,
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