pub struct PeriodicTimer<'a> { /* private fields */ }Expand description
Periodic timer wrapper.
Counts down and automatically reloads, generating an interrupt each cycle.
Implementations§
Source§impl PeriodicTimer<'_>
impl PeriodicTimer<'_>
Sourcepub fn start_micros(&mut self, us: u32)
pub fn start_micros(&mut self, us: u32)
Start the periodic timer with the period in microseconds.
Sourcepub fn tick_elapsed(&self) -> bool
pub fn tick_elapsed(&self) -> bool
Check if a period has elapsed (interrupt pending).
Sourcepub fn clear_tick(&self)
pub fn clear_tick(&self)
Clear the tick interrupt flag.
Auto Trait Implementations§
impl<'a> Freeze for PeriodicTimer<'a>
impl<'a> RefUnwindSafe for PeriodicTimer<'a>
impl<'a> Send for PeriodicTimer<'a>
impl<'a> Sync for PeriodicTimer<'a>
impl<'a> Unpin for PeriodicTimer<'a>
impl<'a> UnsafeUnpin for PeriodicTimer<'a>
impl<'a> UnwindSafe for PeriodicTimer<'a>
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