pub struct AnyTimer<'d>(/* private fields */);
Available on crate feature
unstable
only.Expand description
Any Timer peripheral.
This struct is a type-erased version of a peripheral singleton. It is useful
for creating arrays of peripherals, or avoiding generics. Peripheral singletons
can be type erased by using their From
implementation.
ⓘ
let any_peripheral = AnyTimer::from(peripheral);
Implementations§
Trait Implementations§
Source§impl Timer for AnyTimer<'_>
impl Timer for AnyTimer<'_>
Source§fn clear_interrupt(&self)
fn clear_interrupt(&self)
Clear the timer’s interrupt.
Source§fn is_interrupt_set(&self) -> bool
fn is_interrupt_set(&self) -> bool
Has the timer triggered?
Source§fn peripheral_interrupt(&self) -> Interrupt
fn peripheral_interrupt(&self) -> Interrupt
Returns the interrupt source for the underlying timer