Skip to main content

Timer

Trait Timer 

Source
pub trait Timer: Sealed {
    // Required methods
    fn clear_interrupt(&self);
    fn is_interrupt_set(&self) -> bool;
    fn peripheral_interrupt(&self) -> Interrupt;
}
Expand description

Functionality provided by any timer peripheral.

Required Methods§

Source

fn clear_interrupt(&self)

Clears the timer’s interrupt.

Source

fn is_interrupt_set(&self) -> bool

Returns whether the timer has triggered.

Source

fn peripheral_interrupt(&self) -> Interrupt

Returns the interrupt source for the underlying timer.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Timer for Alarm<'_>

Available on crate feature unstable only.
Source§

impl Timer for AnyTimer<'_>

Available on crate feature unstable only.
Source§

impl Timer for Timer<'_>

Available on crate feature unstable only.