pub struct AnyTimer(/* private fields */);Expand description
A type-erased timer
You can create an instance of this by just calling .into() on a timer.
Trait Implementations§
Source§impl Peripheral for AnyTimer
impl Peripheral for AnyTimer
Source§impl Timer for AnyTimer
impl Timer for AnyTimer
Source§fn is_running(&self) -> bool
fn is_running(&self) -> bool
Is the timer running?
Source§fn load_value(&self, value: MicrosDurationU64) -> Result<(), Error>
fn load_value(&self, value: MicrosDurationU64) -> Result<(), Error>
Load a target value into the timer.
Source§fn enable_auto_reload(&self, auto_reload: bool)
fn enable_auto_reload(&self, auto_reload: bool)
Enable auto reload of the loaded value.
Source§fn enable_interrupt(&self, state: bool)
fn enable_interrupt(&self, state: bool)
Enable or disable the timer’s interrupt.
Source§fn clear_interrupt(&self)
fn clear_interrupt(&self)
Clear the timer’s interrupt.
Source§fn set_interrupt_handler(&self, handler: InterruptHandler)
fn set_interrupt_handler(&self, handler: InterruptHandler)
Set the interrupt handler Read more
Source§fn is_interrupt_set(&self) -> bool
fn is_interrupt_set(&self) -> bool
Has the timer triggered?
Auto Trait Implementations§
impl Freeze for AnyTimer
impl RefUnwindSafe for AnyTimer
impl Send for AnyTimer
impl Sync for AnyTimer
impl Unpin for AnyTimer
impl UnwindSafe for AnyTimer
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