Cargo Features

esp-hal has no features set by default.

[dependencies]
esp-hal = { version = "1.0.0-beta.1", features = ["esp32", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32s2", "esp32s3", "log-04", "defmt", "psram", "unstable"] }
esp32

Chip Support Feature Flags
Target the ESP32.

Enables rtc-slow of esp-hal-procmacros, esp32 of xtensa-lx-rt and esp32

IMPORTANT:
Each supported device MUST have its PAC included below along with a corresponding feature.

esp32c2

Target the ESP32-C2.

Enables esp32c2, unsafe-assume-single-core of portable-atomic

esp32c3

Target the ESP32-C3.

Enables esp32c3, rtc-ram of esp-riscv-rt, unsafe-assume-single-core of portable-atomic

esp32c6

Target the ESP32-C6.

Enables esp32c6, rtc-ram of esp-riscv-rt, has-lp-core of esp-hal-procmacros

esp32h2

Target the ESP32-H2.

Enables esp32h2, rtc-ram of esp-riscv-rt

esp32s2

Target the ESP32-S2.

Enables esp32s2, embassy-usb-driver and embassy-usb-synopsys-otg, esp32sx and fs of esp-synopsys-usb-otg, unsafe-assume-single-core of portable-atomic, has-ulp-core and rtc-slow of esp-hal-procmacros, esp32s2 of xtensa-lx-rt

esp32s3

Target the ESP32-S3.

Enables esp32s3, embassy-usb-driver and embassy-usb-synopsys-otg, esp32sx and fs of esp-synopsys-usb-otg, has-ulp-core and rtc-slow of esp-hal-procmacros, esp32s3 of xtensa-lx-rt

log-04

Logging Feature Flags

Enable logging output using version 0.4 of the log crate.

Enables log

defmt

Enable logging output using defmt and implement defmt::Format on certain types.

Enables defmt of embassy-futures and embassy-sync ^0.6.2, defmt-03 of embedded-hal, optional embedded-io, and optional embedded-io-async, defmt of enumset, fugit, optional esp32, optional esp32c2, optional esp32c3, optional esp32c6, optional esp32h2, optional esp32s2, and optional esp32s3 and defmt

Logging interfaces, they are mutually exclusive so they need to be behind separate features.

psram

PSRAM Feature Flags

Use externally connected PSRAM (quad by default, can be configured to octal via ESP_HAL_CONFIG_PSRAM_MODE)

Affects esp32::psram, esp32s2::psram, esp32s3::psram, soc::MappedPsram, psram_common::psram_raw_parts

unstable

Unstable APIs

Unstable APIs are drivers and features that are not yet ready for general use. They may be incomplete, have bugs, or be subject to change without notice. Unstable APIs are not covered by semver guarantees.

Enables APIs that are not stable and thus come with no stability guarantees.

Enables digest

Dependencies that are optional because they are used by unstable drivers. They are needed when using the unstable feature.

and embassy-embedded-hal, embedded-can, embedded-io, embedded-io-async, nb, rand_core ^0.6.4, rand_core, and ufmt-write

embassy-embedded-hal:

Optional dependencies that enable ecosystem support. We could support individually enabling them, but there is no big downside to just enabling them all via the unstable feature.

Affects adc::AdcConfig, adc::CalibrationAccess