Struct rp2040_pac2::timer::Timer[][src]

pub struct Timer(pub *mut u8);

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]

impl Copy for Timer[src]

impl Send for Timer[src]

impl Sync for Timer[src]

Auto Trait Implementations

impl Unpin for Timer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.