pub struct InterruptTimer<'d, W: TimerWidth, I: Instance<W>> { /* private fields */ }Expand description
A timer that fires an InterruptEvent at a fixed interval.
Implementations§
Source§impl<'d, W: TimerWidth, I: Instance<W>> InterruptTimer<'d, W, I>
impl<'d, W: TimerWidth, I: Instance<W>> InterruptTimer<'d, W, I>
Sourcepub fn set_frequency(&mut self, frequency: u32)
pub fn set_frequency(&mut self, frequency: u32)
Sets the number of times per second a timer should fire.
Sourcepub fn start(&mut self) -> InterruptEvent
pub fn start(&mut self) -> InterruptEvent
Starts the timer and resets the counter and returns the associated InterruptEvent.
The event is either over- or underflow depending on the frequency of the timer.
Trait Implementations§
Source§impl<'d, W: TimerWidth, I: Instance<W>> Drop for InterruptTimer<'d, W, I>
impl<'d, W: TimerWidth, I: Instance<W>> Drop for InterruptTimer<'d, W, I>
Auto Trait Implementations§
impl<'d, W, I> Forget for InterruptTimer<'d, W, I>
impl<'d, W, I> Freeze for InterruptTimer<'d, W, I>
impl<'d, W, I> Move for InterruptTimer<'d, W, I>
impl<'d, W, I> RefUnwindSafe for InterruptTimer<'d, W, I>
impl<'d, W, I> Send for InterruptTimer<'d, W, I>
impl<'d, W, I> Sync for InterruptTimer<'d, W, I>
impl<'d, W, I> Unpin for InterruptTimer<'d, W, I>
impl<'d, W, I> UnsafeUnpin for InterruptTimer<'d, W, I>
impl<'d, W, I> UnwindSafe for InterruptTimer<'d, W, I>
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