esp-hal/esp-hal-common/Cargo.toml
2022-07-15 12:14:27 +02:00

71 lines
3.0 KiB
TOML

[package]
name = "esp-hal-common"
version = "0.1.0"
authors = [
"Jesse Braham <jesse@beta7.io>",
"Björn Quentin <bjoern.quentin@mobile-j.de>",
]
edition = "2021"
description = "HAL implementations for peripherals common among Espressif devices; should not be used directly"
repository = "https://github.com/esp-rs/esp-hal"
license = "MIT OR Apache-2.0"
[dependencies]
cfg-if = "1.0"
embedded-hal = { version = "0.2", features = ["unproven"] }
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.8", optional = true }
fugit = "0.3"
nb = "1.0"
paste = "1.0"
procmacros = { path = "../esp-hal-procmacros", package = "esp-hal-procmacros" }
void = { version = "1.0", default-features = false }
# RISC-V
riscv = { version = "0.8", optional = true }
riscv-atomic-emulation-trap = { version = "0.1", optional = true }
# Xtensa
xtensa-lx = { version = "0.7", optional = true }
xtensa-lx-rt = { version = "0.12", optional = true }
# Part of `ufmt` containing only `uWrite` trait
ufmt-write = { version = "0.1", optional = true }
# Smart-LED (e.g., WS2812/SK68XX) support
smart-leds-trait = { version = "0.2.1", optional = true }
# IMPORTANT:
# Each supported device MUST have its PAC included below along with a
# corresponding feature. We rename the PAC packages because we cannot
# have dependencies and features with the same names.
#
# Please note: for now we use git-dependencies from the `with_source` branch however we pin the dependency
# to specific commits.
esp32_pac = { package = "esp32", git = "https://github.com/esp-rs/esp-pacs.git", rev = "f5905f30f4796ed4da8fe333b6ed9700901c515b", optional = true }
esp32c3_pac = { package = "esp32c3", git = "https://github.com/esp-rs/esp-pacs.git", rev = "f5905f30f4796ed4da8fe333b6ed9700901c515b", optional = true }
esp32s2_pac = { package = "esp32s2", git = "https://github.com/esp-rs/esp-pacs.git", rev = "f5905f30f4796ed4da8fe333b6ed9700901c515b", optional = true }
esp32s3_pac = { package = "esp32s3", git = "https://github.com/esp-rs/esp-pacs.git", rev = "f5905f30f4796ed4da8fe333b6ed9700901c515b", optional = true }
[features]
esp32 = [ "esp32_pac/rt", "xtensa", "dual_core", "xtensa-lx-rt/esp32", "xtensa-lx/esp32", "smartled"]
esp32c3 = ["esp32c3_pac/rt", "risc_v", "single_core", "smartled"]
esp32s2 = ["esp32s2_pac/rt", "xtensa", "single_core", "xtensa-lx-rt/esp32s2", "xtensa-lx/esp32s2", "smartled"]
esp32s3 = ["esp32s3_pac/rt", "xtensa", "dual_core", "xtensa-lx-rt/esp32s3", "xtensa-lx/esp32s3", "smartled"]
# Architecture (should not be enabled directly, but instead by a PAC's feature)
risc_v = ["riscv", "riscv-atomic-emulation-trap"]
xtensa = ["procmacros/rtc_slow"]
# Core Count (should not be enabled directly, but instead by a PAC's feature)
single_core = []
dual_core = []
# To support `ufmt`
ufmt = ["ufmt-write"]
# To use the external `smart_led` crate
smartled = ["smart-leds-trait"]
# Implement the `embedded-hal==1.0.0-alpha.x` traits
eh1 = ["embedded-hal-1"]