[package]
name         = "esp-hal-embassy"
version      = "0.2.0"
edition      = "2021"
rust-version = "1.76.0"
description  = "Embassy support for esp-hal"
repository   = "https://github.com/esp-rs/esp-hal"
license      = "MIT OR Apache-2.0"

[package.metadata.docs.rs]
default-target = "riscv32imac-unknown-none-elf"
features       = ["esp32c6"]

[dependencies]
critical-section    = "1.1.2"
defmt               = { version = "0.3.8", optional = true }
document-features   = "0.2.10"
embassy-executor    = { version = "0.5.0", optional = true }
embassy-time-driver = { version = "0.1.0", features = [ "tick-hz-1_000_000" ] }
esp-hal             = { version = "0.19.0", path = "../esp-hal" }
log                 = { version = "0.4.22", optional = true }
macros              = { version = "0.12.0", features = ["embassy"], package = "esp-hal-procmacros", path = "../esp-hal-procmacros" }
portable-atomic     = "1.6.0"

[build-dependencies]
cfg-if       = "1.0.0"
esp-build    = { version = "0.1.0", path = "../esp-build" }
esp-metadata = { version = "0.2.0", path = "../esp-metadata" }

[features]
default = ["executors"]

esp32   = ["esp-hal/esp32"]
esp32c2 = ["esp-hal/esp32c2"]
esp32c3 = ["esp-hal/esp32c3"]
esp32c6 = ["esp-hal/esp32c6"]
esp32h2 = ["esp-hal/esp32h2"]
esp32s2 = ["esp-hal/esp32s2"]
esp32s3 = ["esp-hal/esp32s3"]

## Implement `defmt::Format` on certain types.
defmt = ["dep:defmt", "embassy-executor?/defmt", "esp-hal/defmt"]
## Enable logging via the log crate
log = ["dep:log"]
## Provide `Executor` and `InterruptExecutor`
executors = ["dep:embassy-executor"]
## Use the executor-integrated `embassy-time` timer queue.
integrated-timers = ["embassy-executor?/integrated-timers"]

[lints.rust]
unexpected_cfgs = "allow"
