pub struct Timer { /* private fields */ }
Available on crate feature
unstable
only.Expand description
A timer within a Timer Group.
Trait Implementations§
Source§impl InterruptConfigurable for Timer
impl InterruptConfigurable for Timer
Source§fn set_interrupt_handler(&mut self, handler: InterruptHandler)
fn set_interrupt_handler(&mut self, handler: InterruptHandler)
Set the interrupt handler Read more
Source§impl Peripheral for Timer
impl Peripheral for Timer
Source§unsafe fn clone_unchecked(&self) -> Self::P
unsafe fn clone_unchecked(&self) -> Self::P
Unsafely clone (duplicate) a peripheral singleton. Read more
Source§fn into_ref<'a>(self) -> PeripheralRef<'a, Self::P>where
Self: 'a,
fn into_ref<'a>(self) -> PeripheralRef<'a, Self::P>where
Self: 'a,
Convert a value into a
PeripheralRef
. Read moreSource§impl Timer for Timer
impl Timer for Timer
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 is_interrupt_set(&self) -> bool
fn is_interrupt_set(&self) -> bool
Has the timer triggered?
Source§fn async_interrupt_handler(&self) -> InterruptHandler
fn async_interrupt_handler(&self) -> InterruptHandler
Returns the HAL provided async interrupt handler
Source§fn peripheral_interrupt(&self) -> Interrupt
fn peripheral_interrupt(&self) -> Interrupt
Returns the interrupt source for the underlying timer