Cargo Features

[dependencies]
esp32c2-hal = { version = "0.13.1", default-features = false, features = ["async", "debug", "defmt", "direct-vectoring", "eh1", "embedded-io", "interrupt-preemption", "log", "rt", "ufmt", "vectored", "xtal-26mhz", "xtal-40mhz", "embassy", "embassy-executor-interrupt", "embassy-executor-thread", "embassy-integrated-timers", "embassy-time-systick", "embassy-time-timg0"] }
default = embassy-integrated-timers, rt, vectored, xtal-40mhz

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

async

Enables async of esp-hal-common

esp-hal-common:

Support for asynchronous operation, implementing traits from embedded-hal-async and embedded-io-async

debug

Enables debug of esp-hal-common

esp-hal-common:

Enable the impl-register-debug feature for the selected PAC

defmt

Enables defmt-espflash of esp-println and defmt of esp-hal-common

esp-hal-common:

Enable support for defmt, for esp-hal-common and also for all our dependencies

direct-vectoring

Enables direct-vectoring of esp-hal-common

esp-hal-common:

Interrupt-related feature:
- Use direct interrupt vectoring (RISC-V only!)
- Use interrupt preemption (RISC-V only!)
- Use vectored interrupts (calling the handlers defined in the PAC)

eh1

Enables eh1 of esp-hal-common

esp-hal-common:

Trait implementation features:

  • Implement the embedded-hal@1.0.0-rc.x traits (and friends)
  • Implement the embedded-io traits where able
  • Implement the ufmt_write::Write trait where able

embedded-io

Enables embedded-io of esp-hal-common

interrupt-preemption

Enables interrupt-preemption of esp-hal-common

log

Enables log of esp-hal-common and esp-println

esp-hal-common:

Enable logging

rt default

Enables rt-riscv of esp-hal-common

esp-hal-common:

Runetime support

ufmt

Enables ufmt of esp-hal-common

vectored default

Enables vectored of esp-hal-common

xtal-26mhz

Enables xtal-26mhz of esp-hal-common

esp-hal-common:

Crystal frequency selection (ESP32 and ESP32-C2 only!)

xtal-40mhz default

Enables xtal-40mhz of esp-hal-common

embassy

Embassy support

Enables embassy of esp-hal-common

embassy-executor-interrupt

Enables embassy-executor-interrupt of esp-hal-common

embassy-executor-thread

Enables embassy-executor-thread of esp-hal-common

embassy-integrated-timers default

Enables embassy-integrated-timers of esp-hal-common

embassy-time-systick

Enables embassy-time-systick of esp-hal-common and tick-hz-16_000_000 of embassy-time

embassy-time:

16.0MHz Tick Rate

embassy-time-timg0

Enables embassy-time-timg0 of esp-hal-common and tick-hz-1_000_000 of embassy-time

embassy-time:

1.0MHz Tick Rate