[package]
name = "device-envoy-esp"
version = "0.0.5-alpha.4"
edition = "2021"
description = "Build ESP32 applications with composable device abstractions"
keywords = ["embedded", "esp32", "esp32c6", "esp32s3", "ws2812"]
categories = ["embedded", "asynchronous", "no-std", "hardware-support"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/CarlKCarlK/device-envoy"
documentation = "https://docs.rs/device-envoy-esp"
homepage = "https://github.com/CarlKCarlK/device-envoy"

[package.metadata.docs.rs]
all-features = false
no-default-features = true
default-target = "riscv32imac-unknown-none-elf"
targets = ["riscv32imac-unknown-none-elf"]
features = ["doc-images"]
rustdoc-args = ["--cfg", "docsrs"]

[features]
host = []
compile-fail-tests = []
doc-images = ["dep:embed-doc-image"]

[dependencies]
embassy-executor = { version = "0.9.0" }
embassy-time   = { version = "0.5.0" }
embassy-sync   = { version = "0.7.2" }
embassy-futures = { version = "0.1.2" }
smart-leds     = { version = "0.4.0" }
device-envoy-core = { version = "0.0.5-alpha.3", path = "../device-envoy-core", features = ["wifi"] }
embedded-graphics = { version = "0.8", default-features = false }
heapless       = { version = "0.8.0", features = ["serde"] }
static_cell    = { version = "2.1.0" }
paste          = { version = "1.0" }
embed-doc-image = { version = "0.1.4", optional = true }
embedded-storage = "0.3.1"
serde = { version = "1.0", default-features = false, features = ["derive"] }
time = { version = "0.3", default-features = false }
portable-atomic = { version = "1.11.1", features = ["critical-section"] }

[target.'cfg(all(target_os = "none", target_arch = "riscv32"))'.dependencies]
esp-hal = { version = "1.0.0", features = ["esp32c6", "unstable"] }
esp-rtos = { version = "0.2.0", features = ["esp32c6", "embassy", "esp-radio", "esp-alloc"] }
esp-storage = { version = "0.8.1", features = ["esp32c6"] }
esp-alloc = { version = "0.9.0", features = ["esp32c6"] }
esp-radio = { version = "0.17.0", default-features = false, features = ["esp32c6", "wifi", "esp-alloc", "log-04", "unstable"] }
embassy-net = { version = "0.8.0", features = ["dhcpv4", "dns", "proto-ipv4", "udp", "tcp"] }
log = { version = "0.4", default-features = false }
embedded-hal-bus = { version = "0.3.0", features = ["async"] }
esp-hal-mfrc522 = "0.3.3"

[target.'cfg(all(target_os = "none", target_arch = "xtensa"))'.dependencies]
esp-hal = { version = "1.0.0", features = ["esp32s3", "unstable"] }
esp-rtos = { version = "0.2.0", features = ["esp32s3", "embassy", "esp-radio", "esp-alloc"] }
esp-storage = { version = "0.8.1", features = ["esp32s3"] }
esp-alloc = { version = "0.9.0", features = ["esp32s3"] }
esp-radio = { version = "0.17.0", default-features = false, features = ["esp32s3", "wifi", "esp-alloc", "log-04", "unstable"] }
embassy-net = { version = "0.8.0", features = ["dhcpv4", "dns", "proto-ipv4", "udp", "tcp"] }
log = { version = "0.4", default-features = false }
embedded-hal-bus = { version = "0.3.0", features = ["async"] }
esp-hal-mfrc522 = "0.3.3"

[dev-dependencies]
device-envoy-example-common = { path = "../device-envoy-example-common" }

[target.'cfg(not(target_os = "none"))'.dev-dependencies]
png = { version = "0.17" }
trybuild = { version = "1.0" }

[target.'cfg(all(target_os = "none", target_arch = "riscv32"))'.dev-dependencies]
esp-backtrace = { version = "0.18.1", features = [
    "esp32c6",
    "panic-handler",
    "halt-cores",
    "println",
] }
esp-println = { version = "0.16.1", default-features = false, features = ["esp32c6", "uart", "log-04"] }
log = { version = "0.4", default-features = false }
esp-bootloader-esp-idf = { version = "0.4.0", features = ["esp32c6"] }

[target.'cfg(all(target_os = "none", target_arch = "xtensa"))'.dev-dependencies]
esp-backtrace = { version = "0.18.1", features = [
    "esp32s3",
    "panic-handler",
    "halt-cores",
    "println",
] }
esp-println = { version = "0.16.1", default-features = false, features = ["esp32s3", "uart", "log-04"] }
log = { version = "0.4", default-features = false }
esp-bootloader-esp-idf = { version = "0.4.0", features = ["esp32s3"] }

[[test]]
name = "ir_two_receivers_compile"
path = "tests/embedded/ir_two_receivers_compile.rs"
harness = false

[[test]]
name = "led_strip_two_strips_compile"
path = "tests/embedded/led_strip_two_strips_compile.rs"
harness = false

[[test]]
name = "led_strip_spi_two_strips_compile"
path = "tests/embedded/led_strip_spi_two_strips_compile.rs"
harness = false

[[test]]
name = "led2d_two_panels_compile"
path = "tests/embedded/led2d_two_panels_compile.rs"
harness = false

[[test]]
name = "led4_two_displays_compile"
path = "tests/embedded/led4_two_displays_compile.rs"
harness = false

[[test]]
name = "led_five_compile"
path = "tests/embedded/led_five_compile.rs"
harness = false

[[test]]
name = "lcd_text_four_addresses_compile"
path = "tests/embedded/lcd_text_four_addresses_compile.rs"
harness = false

[[test]]
name = "clock_sync_two_compile"
path = "tests/embedded/clock_sync_two_compile.rs"
harness = false

[[test]]
name = "button_five_compile"
path = "tests/embedded/button_five_compile.rs"
harness = false

[[test]]
name = "button_watch_five_compile"
path = "tests/embedded/button_watch_five_compile.rs"
harness = false

[[test]]
name = "rfid_one_compile"
path = "tests/embedded/rfid_one_compile.rs"
harness = false

[[test]]
name = "ir_four_receivers_compile"
path = "tests/embedded/ir_four_receivers_compile.rs"
harness = false

[[test]]
name = "ir_mapping_four_receivers_compile"
path = "tests/embedded/ir_mapping_four_receivers_compile.rs"
harness = false

[[test]]
name = "ir_kepler_four_receivers_compile"
path = "tests/embedded/ir_kepler_four_receivers_compile.rs"
harness = false

[[test]]
name = "ir_visibility_compile"
path = "tests/embedded/ir_visibility_compile.rs"
harness = false

[[test]]
name = "ir_duplicate_channel_compile_fail"
path = "tests/embedded/ir_duplicate_channel_compile_fail.rs"
harness = false
required-features = ["compile-fail-tests"]

[[test]]
name = "ir_colon_form_compile_fail"
path = "tests/embedded/ir_colon_form_compile_fail.rs"
harness = false
required-features = ["compile-fail-tests"]

[[test]]
name = "lcd_text_duplicate_address_compile_fail"
path = "tests/embedded/lcd_text_duplicate_address_compile_fail.rs"
harness = false
required-features = ["compile-fail-tests"]
