pub struct TimerDriver<'d> { /* private fields */ }Expand description
Timer driver managing 3 independent timer channels.
Implementations§
Source§impl<'d> TimerDriver<'d>
impl<'d> TimerDriver<'d>
Sourcepub fn current_value(&self, n: usize) -> u32
pub fn current_value(&self, n: usize) -> u32
Read the current counter value.
Sourcepub fn interrupt_pending(&self, n: usize) -> bool
pub fn interrupt_pending(&self, n: usize) -> bool
Check if a timer interrupt is pending.
Sourcepub fn clear_interrupt(&self, n: usize)
pub fn clear_interrupt(&self, n: usize)
Clear a timer interrupt (per-channel EOI).
Sourcepub fn oneshot(&self, channel: usize) -> OneShotTimer<'_>
pub fn oneshot(&self, channel: usize) -> OneShotTimer<'_>
Create a one-shot timer wrapper for the given channel.
Sourcepub fn periodic(&self, channel: usize) -> PeriodicTimer<'_>
pub fn periodic(&self, channel: usize) -> PeriodicTimer<'_>
Create a periodic timer wrapper for the given channel.
Auto Trait Implementations§
impl<'d> Freeze for TimerDriver<'d>
impl<'d> RefUnwindSafe for TimerDriver<'d>
impl<'d> Send for TimerDriver<'d>
impl<'d> Sync for TimerDriver<'d>
impl<'d> Unpin for TimerDriver<'d>
impl<'d> UnsafeUnpin for TimerDriver<'d>
impl<'d> UnwindSafe for TimerDriver<'d>
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