Struct rp2040_hal::timer::Timer
source · pub struct Timer { /* private fields */ }
Expand description
Timer peripheral
Implementations§
source§impl Timer
impl Timer
sourcepub fn get_counter(&self) -> Instant
pub fn get_counter(&self) -> Instant
Get the current counter value.
sourcepub fn get_counter_low(&self) -> u32
pub fn get_counter_low(&self) -> u32
Get the value of the least significant word of the counter.
sourcepub fn count_down(&self) -> CountDown<'_>
pub fn count_down(&self) -> CountDown<'_>
Initialized a Count Down instance without starting it.
sourcepub fn alarm_0(&mut self) -> Option<Alarm0>
pub fn alarm_0(&mut self) -> Option<Alarm0>
Retrieve a reference to alarm 0. Will only return a value the first time this is called
sourcepub fn alarm_1(&mut self) -> Option<Alarm1>
pub fn alarm_1(&mut self) -> Option<Alarm1>
Retrieve a reference to alarm 1. Will only return a value the first time this is called