Module timer

Module timer 

Source
Expand description

Timer Peripheral

The Timer peripheral on rp235x consists of a 64-bit counter and 4 alarms.
The Counter is incremented once per microsecond. It obtains its clock source from the watchdog peripheral, you must enable the watchdog before using this peripheral.
Since it would take thousands of years for this counter to overflow you do not need to write logic for dealing with this if using get_counter.

Each of the 4 alarms can match on the lower 32 bits of Counter and trigger an interrupt.

See Section 12.8 of the datasheet for more details.

Structs§

Alarm0
An alarm that can be used to schedule events in the future. Alarms can also be configured to trigger interrupts.
Alarm1
An alarm that can be used to schedule events in the future. Alarms can also be configured to trigger interrupts.
Alarm2
An alarm that can be used to schedule events in the future. Alarms can also be configured to trigger interrupts.
Alarm3
An alarm that can be used to schedule events in the future. Alarms can also be configured to trigger interrupts.
CopyableTimer0
Represents Timer0
CopyableTimer1
Represents Timer1
CountDown
Implementation of the embedded_hal_0_2::timer traits using rp235x_hal::timer counter.
Timer
Timer peripheral

Enums§

ScheduleAlarmError
Errors that can be returned from any of the AlarmX::schedule methods.

Traits§

Alarm
Alarm abstraction.
TimerDevice
Trait to handle both underlying devices (TIMER0 and TIMER1)

Type Aliases§

Instant
Instant type used by the Timer & Alarm methods.