pub struct Delay<TIM, const FREQ: u32>(/* private fields */);
Expand description
Periodic non-blocking timer that imlements embedded_hal::blocking::delay traits
Implementations§
Methods from Deref<Target = FTimer<T, 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, dbg: &mut DBG, state: bool)
pub fn stop_in_debug(&mut self, dbg: &mut DBG, state: bool)
Stopping timer in debug mode can cause troubles when sampling the signal
pub fn set_master_mode(&mut self, mode: TIM::Mms)
Trait Implementations§
Auto Trait Implementations§
impl<TIM, const FREQ: u32> Freeze for Delay<TIM, FREQ>where
TIM: Freeze,
impl<TIM, const FREQ: u32> RefUnwindSafe for Delay<TIM, FREQ>where
TIM: RefUnwindSafe,
impl<TIM, const FREQ: u32> Send for Delay<TIM, FREQ>where
TIM: Send,
impl<TIM, const FREQ: u32> Sync for Delay<TIM, FREQ>where
TIM: Sync,
impl<TIM, const FREQ: u32> Unpin for Delay<TIM, FREQ>where
TIM: Unpin,
impl<TIM, const FREQ: u32> UnwindSafe for Delay<TIM, FREQ>where
TIM: 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