Module esp32c3_hal::delay
source · Expand description
Delay driver
Overview
The Delay driver provides blocking delay functionalities using the
SYSTIMER
peripheral for RISC-V devices and the built-in Xtensa timer for
Xtensa devices. This module implements the blocking DelayMs and DelayUs
traits from embedded-hal.
The delays are implemented in a “best-effort” way, meaning that the CPU will block for at least the amount of time specified, but accuracy can be affected by many factors, including interrupt usage.
Example
let mut clocks = ClockControl::boot_defaults(system.clock_control).freeze();
let mut delay = Delay::new(&clocks);
delay.delay_ms(1000 as u32);
Structs
- Delay driver