Expand description
Timer driver for WS63 (3 independent 32-bit timers).
Each timer can operate in one-shot or periodic mode.
The timer counts at the TCXO crystal clock (TIMER_CLOCK_HZ = 24 MHz on
24 MHz-crystal boards) — NOT the 240 MHz CPU/PLL clock. The vendor SDK programs
the timer to the crystal via timer_porting_clock_value_set(REQ_24M).
§Usage
ⓘ
let timer = TimerDriver::new(peripherals.TIMER);
let mut oneshot = timer.oneshot(0);
oneshot.start(24_000); // 1ms at 24MHz
while !oneshot.expired() {}Structs§
- OneShot
Timer - One-shot timer wrapper.
- Periodic
Timer - Periodic timer wrapper.
- Timer
Driver - Timer driver managing 3 independent timer channels.
Enums§
- Timer
Mode - Timer operating mode.