Expand description
Delay providers.
If you don’t know how large your delays will be, you’ll probably want to
use Delay. Otherwise use Ets for delays <10ms and
FreeRtos for delays >=10ms.
Example of an Ets vs. FreeRtos auto-selecting delay:
use esp_idf_hal::delay::Delay;
let delay: Delay = Default::default();
// ...
delay.delay_us(42);
// ...
delay.delay_ms(142);
// ...Example of a small microsecond delay:
use esp_idf_hal::delay::Ets;
Ets::delay_us(42);Example of a millisecond delay:
use esp_idf_hal::delay::FreeRtos;
FreeRtos::delay_ms(42);Example of an embedded_hal::delay::DelayNs consumer with an Ets vs. FreeRtos auto-selecting delay:
ⓘ
use esp_idf_hal::delay::Delay;
let mut delay: Delay = Default::default();
some_trait_user(&mut delay);Structs§
- Delay
- A delay provider that uses
Etsfor delays below a certain threshold andFreeRtosfor delays equal or above the threshold. - Ets
- Espressif’s built-in delay provider for small delays
- Free
Rtos - FreeRTOS-based delay provider for delays larger than 10 ms.
- Tick
Type - Transparent wrapper around TickType_t with conversion methods.
Constants§
- BLOCK
- Sentinel value used as “maximum delay” or “maximum blocking” marker.
- NON_
BLOCK - Sentinel value used as “no delay” or “no blocking” marker.
- TICK_
RATE_ HZ - The configured OS tick rate in Hz. There are TICK_RATE_HZ number of TickType ticks per second.
Type Aliases§
- Tick
Type_ t - The raw OS tick type. Also see TickType.