pub struct FTimer<TIM, const FREQ: u32> { /* private fields */ }Expand description
Timer wrapper for fixed precision timers.
Uses fugit::TimerDurationU32 for most of operations
Implementations§
Source§impl<TIM: GeneralTimer, const FREQ: u32> FTimer<TIM, FREQ>
impl<TIM: GeneralTimer, const FREQ: u32> FTimer<TIM, FREQ>
pub fn counter(self) -> Counter<TIM, FREQ>
Sourcepub fn listen(&mut self, event: Event)
pub fn listen(&mut self, event: Event)
Starts listening for an event
Note, you will also have to enable the TIM2 interrupt in the NVIC to start receiving events.
Sourcepub fn clear_interrupt(&mut self, event: Event)
pub fn clear_interrupt(&mut self, event: Event)
Clears interrupt associated with event.
If the interrupt is not cleared, it will immediately retrigger after the ISR has finished.
pub fn get_interrupt(&mut self) -> Event
Sourcepub fn stop_in_debug(&mut self, state: bool)
pub fn stop_in_debug(&mut self, state: bool)
Stopping timer in debug mode can cause troubles when sampling the signal