Cargo Features

[dependencies]
esp-idf-hal = { version = "0.44.1", default-features = false, features = ["std", "alloc", "nightly", "wake-from-isr", "embassy-sync", "adc-oneshot-legacy", "native", "pio", "alloc_handler", "panic_handler", "binstart", "libstart", "critical-section"] }
default = binstart, std

These default features are set whenever esp-idf-hal is added without default-features = false somewhere in the dependency tree.

std default = alloc

Enables std of esp-idf-sys

alloc std

Affects rmt::VariableLengthSignal, task::block_on, task::notification

nightly
wake-from-isr

Only enable if you plan to use the edge-executor crate

Affects interrupt::asynch

embassy-sync

For now, the dependecy on the embassy-sync crate is non-optional, but this might change in future

Affects interrupt::embassy_sync

adc-oneshot-legacy

Temporary, until (https://github.com/espressif/esp-idf/issues/13938) is addressed

  • When enabled, the code for the legacy ADC oneshot driver will be compiled;
  • When not enabled (default) the code for the new ADC oneshot driver will be compiled;
  • Since we don't wrap the legacy continuous ADC driver, the new continuous ADC driver is always compiled.
native

Propagated esp-idf-sys features

Enables native of esp-idf-sys

pio

Enables pio of esp-idf-sys

alloc_handler

Enables alloc_handler of esp-idf-sys

panic_handler

Enables panic_handler of esp-idf-sys

binstart default

Enables binstart of esp-idf-sys

libstart

Enables libstart of esp-idf-sys

Features from optional dependencies

critical-section implicit feature

Enables critical-section

critical-section:

Cross-platform critical section

Affects task::critical_section