Skip to main content

Module timer

Module timer 

Source
Expand description

Timer driver for WS63 (3 independent 32-bit timers).

Each timer can operate in one-shot or periodic mode. The timer clock source is the system peripheral clock (PCLK = 240MHz).

§Usage

let timer = TimerDriver::new(peripherals.TIMER);
let mut oneshot = timer.oneshot(0);
oneshot.start(240_000); // 1ms at 240MHz
while !oneshot.expired() {}

Structs§

OneShotTimer
One-shot timer wrapper.
PeriodicTimer
Periodic timer wrapper.
TimerDriver
Timer driver managing 3 independent timer channels.

Enums§

TimerMode
Timer operating mode.