Struct rp2040_pac::timer::RegisterBlock
source · #[repr(C)]pub struct RegisterBlock { /* private fields */ }
Expand description
Register block
Implementations§
source§impl RegisterBlock
impl RegisterBlock
sourcepub const fn timehw(&self) -> &TIMEHW
pub const fn timehw(&self) -> &TIMEHW
0x00 - Write to bits 63:32 of time
always write timelw before timehw
sourcepub const fn timelw(&self) -> &TIMELW
pub const fn timelw(&self) -> &TIMELW
0x04 - Write to bits 31:0 of time
writes do not get copied to time until timehw is written
sourcepub const fn timehr(&self) -> &TIMEHR
pub const fn timehr(&self) -> &TIMEHR
0x08 - Read from bits 63:32 of time
always read timelr before timehr
sourcepub const fn alarm0(&self) -> &ALARM0
pub const fn alarm0(&self) -> &ALARM0
0x10 - Arm alarm 0, and configure the time it will fire.
Once armed, the alarm fires when TIMER_ALARM0 == TIMELR.
The alarm will disarm itself once it fires, and can
be disarmed early using the ARMED status register.
sourcepub const fn alarm1(&self) -> &ALARM1
pub const fn alarm1(&self) -> &ALARM1
0x14 - Arm alarm 1, and configure the time it will fire.
Once armed, the alarm fires when TIMER_ALARM1 == TIMELR.
The alarm will disarm itself once it fires, and can
be disarmed early using the ARMED status register.
sourcepub const fn alarm2(&self) -> &ALARM2
pub const fn alarm2(&self) -> &ALARM2
0x18 - Arm alarm 2, and configure the time it will fire.
Once armed, the alarm fires when TIMER_ALARM2 == TIMELR.
The alarm will disarm itself once it fires, and can
be disarmed early using the ARMED status register.
sourcepub const fn alarm3(&self) -> &ALARM3
pub const fn alarm3(&self) -> &ALARM3
0x1c - Arm alarm 3, and configure the time it will fire.
Once armed, the alarm fires when TIMER_ALARM3 == TIMELR.
The alarm will disarm itself once it fires, and can
be disarmed early using the ARMED status register.
sourcepub const fn armed(&self) -> &ARMED
pub const fn armed(&self) -> &ARMED
0x20 - Indicates the armed/disarmed status of each alarm.
A write to the corresponding ALARMx register arms the alarm.
Alarms automatically disarm upon firing, but writing ones here
will disarm immediately without waiting to fire.
sourcepub const fn timerawh(&self) -> &TIMERAWH
pub const fn timerawh(&self) -> &TIMERAWH
0x24 - Raw read from bits 63:32 of time (no side effects)
sourcepub const fn timerawl(&self) -> &TIMERAWL
pub const fn timerawl(&self) -> &TIMERAWL
0x28 - Raw read from bits 31:0 of time (no side effects)