esp-hal/hil-test/Cargo.toml
Scott Mabin 21d833d2a3
Refactor testing, add defmt, add async gpio test (#1363)
* Refactor testing, add defmt, add async gpio test

* Add test to ensure the some edge case pins can be used in async mode

* Add test for pin0

* clippy

* update test to use constants extracted from esp-idf's soc module

* address review comments

* simplify test to just initialize one pin as async

* changelog
2024-04-02 15:28:15 +00:00

87 lines
3.0 KiB
TOML

[package]
name = "hil-test"
version = "0.0.0"
edition = "2021"
publish = false
[[test]]
name = "aes"
harness = false
[[test]]
name = "gpio"
harness = false
[[test]]
name = "spi_full_duplex"
harness = false
[[test]]
name = "uart"
harness = false
[[test]]
name = "uart_async"
harness = false
required-features = ["async", "embassy"]
[dependencies]
defmt = { version = "0.3.6" }
defmt-rtt = { version = "0.4.0" }
embassy-time = { version = "0.3.0", features = ["generic-queue-64"] }
embassy-futures = { version = "0.1" }
embedded-hal = { version = "1.0.0" }
embedded-hal-02 = { version = "0.2.7", package = "embedded-hal", features = ["unproven"] }
embedded-hal-async = { version = "1.0.0", optional = true }
embedded-hal-nb = { version = "1.0.0", optional = true }
esp-hal = { path = "../esp-hal", features = ["defmt", "embedded-hal", "embedded-hal-02"], optional = true }
esp-backtrace = { version = "0.11.1", git = "https://github.com/esp-rs/esp-backtrace", rev = "edff83c3945e8aa11081d8467af65803a82434ba", default-features = false, features = ["exception-handler", "panic-handler", "defmt", "semihosting"] }
critical-section = { version = "1.1.2" }
portable-atomic = "1"
cfg-if = "1"
[dev-dependencies]
embassy-executor = { version = "0.5.0", default-features = false, features = ["executor-thread", "arch-riscv32"] }
# Add the `embedded-test/defmt` feature for more verbose testing
embedded-test = { git = "https://github.com/probe-rs/embedded-test", rev = "b67dec33992f5bd79d414a0e70220dc4142278cf", default-features = false }
[features]
default = ["async", "embassy", "embassy-time-timg0"]
# Device support (required!):
esp32 = ["esp-hal/esp32", "esp-backtrace/esp32"]
esp32c2 = ["esp-hal/esp32c2", "esp-backtrace/esp32c2"]
esp32c3 = ["esp-hal/esp32c3", "esp-backtrace/esp32c3"]
esp32c6 = ["esp-hal/esp32c6", "esp-backtrace/esp32c6"]
esp32h2 = ["esp-hal/esp32h2", "esp-backtrace/esp32h2"]
esp32s2 = ["esp-hal/esp32s2", "esp-backtrace/esp32s2"]
esp32s3 = ["esp-hal/esp32s3", "esp-backtrace/esp32s3"]
# Async & Embassy:
async = ["dep:embedded-hal-async", "esp-hal?/async"]
embassy = ["esp-hal?/embassy", "embedded-test/embassy"]
embassy-executor-interrupt = ["esp-hal?/embassy-executor-interrupt"]
embassy-executor-thread = ["esp-hal?/embassy-executor-thread"]
embassy-time-systick-16mhz = ["esp-hal?/embassy-time-systick-16mhz"]
embassy-time-systick-80mhz = ["esp-hal?/embassy-time-systick-80mhz"]
embassy-time-timg0 = ["esp-hal?/embassy-time-timg0"]
# https://doc.rust-lang.org/cargo/reference/profiles.html#test
# Test and bench profiles inherit from dev and release respectively.
[profile.dev]
codegen-units = 1
debug = 2
debug-assertions = true
incremental = false
opt-level = "z"
overflow-checks = true
[profile.release]
codegen-units = 1
debug = 2
debug-assertions = false
incremental = false
opt-level = 3
lto = "fat"
overflow-checks = false