Struct rp2040_pac2::timer::Timer [−][src]
Controls time and alarms time is a 64 bit value indicating the time in usec since power-on timeh is the top 32 bits of time & timel is the bottom 32 bits to change time write to timelw before timehw to read time read from timelr before timehr An alarm is set by setting alarm_enable and writing to the corresponding alarm register When an alarm is pending, the corresponding alarm_running signal will be high An alarm can be cancelled before it has finished by clearing the alarm_enable When an alarm fires, the corresponding alarm_irq is set and alarm_running is cleared To clear the interrupt write a 1 to the corresponding alarm_irq
Implementations
impl Timer[src]
pub fn timehw(self) -> Reg<u32, W>[src]
Write to bits 63:32 of time always write timelw before timehw
pub fn timelw(self) -> Reg<u32, W>[src]
Write to bits 31:0 of time writes do not get copied to time until timehw is written
pub fn timehr(self) -> Reg<u32, R>[src]
Read from bits 63:32 of time always read timelr before timehr
pub fn timelr(self) -> Reg<u32, R>[src]
Read from bits 31:0 of time
pub fn alarm0(self) -> Reg<u32, RW>[src]
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.
pub fn alarm1(self) -> Reg<u32, RW>[src]
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.
pub fn alarm2(self) -> Reg<u32, RW>[src]
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.
pub fn alarm3(self) -> Reg<u32, RW>[src]
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.
pub fn armed(self) -> Reg<Armed, RW>[src]
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.
pub fn timerawh(self) -> Reg<u32, R>[src]
Raw read from bits 63:32 of time (no side effects)
pub fn timerawl(self) -> Reg<u32, R>[src]
Raw read from bits 31:0 of time (no side effects)
pub fn dbgpause(self) -> Reg<Dbgpause, RW>[src]
Set bits high to enable pause when the corresponding debug ports are active
pub fn pause(self) -> Reg<Pause, RW>[src]
Set high to pause the timer
pub fn intr(self) -> Reg<Intr, RW>[src]
Raw Interrupts
pub fn inte(self) -> Reg<Inte, RW>[src]
Interrupt Enable
pub fn intf(self) -> Reg<Intf, RW>[src]
Interrupt Force
pub fn ints(self) -> Reg<Ints, RW>[src]
Interrupt status after masking & forcing
Trait Implementations
impl Clone for Timer[src]
fn clone(&self) -> Timer[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for Timer[src]
impl Send for Timer[src]
impl Sync for Timer[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,