Skip to content

Commit

Permalink
Fix the build for esp32c6 and other esps with CAS
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Jan 28, 2025
1 parent 8284694 commit 70d1679
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
14 changes: 7 additions & 7 deletions examples/esp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ embassy-sync = "0.6"
embassy-futures = "0.1"
embassy-time = "0.4"
static_cell = "2"
portable-atomic = { version = "1", features = ["unsafe-assume-single-core"] }
portable-atomic = "1"

[features]
default = ["esp32c3"]
Expand All @@ -53,12 +53,12 @@ default = ["esp32c3"]
#
# [1]: https://github.com/embassy-rs/trouble/pull/236#issuecomment-2586457641
#
esp32 = ["esp-hal/esp32", "esp-backtrace/esp32", "esp-hal-embassy/esp32", "esp-println/esp32", "esp-wifi/esp32"]
esp32c2 = ["esp-hal/esp32c2", "esp-backtrace/esp32c2", "esp-hal-embassy/esp32c2", "esp-println/esp32c2", "esp-wifi/esp32c2"]
esp32c3 = ["esp-hal/esp32c3", "esp-backtrace/esp32c3", "esp-hal-embassy/esp32c3", "esp-println/esp32c3", "esp-wifi/esp32c3"]
esp32c6 = ["esp-hal/esp32c6", "esp-backtrace/esp32c6", "esp-hal-embassy/esp32c6", "esp-println/esp32c6", "esp-wifi/esp32c6"]
esp32h2 = ["esp-hal/esp32h2", "esp-backtrace/esp32h2", "esp-hal-embassy/esp32h2", "esp-println/esp32h2", "esp-wifi/esp32h2"]
esp32s3 = ["esp-hal/esp32s3", "esp-backtrace/esp32s3", "esp-hal-embassy/esp32s3", "esp-println/esp32s3", "esp-wifi/esp32s3"]
esp32 = ["esp-hal/esp32", "esp-backtrace/esp32", "esp-hal-embassy/esp32", "esp-println/esp32", "esp-wifi/esp32", "portable-atomic/critical-section"]
esp32c2 = ["esp-hal/esp32c2", "esp-backtrace/esp32c2", "esp-hal-embassy/esp32c2", "esp-println/esp32c2", "esp-wifi/esp32c2", "portable-atomic/critical-section"]
esp32c3 = ["esp-hal/esp32c3", "esp-backtrace/esp32c3", "esp-hal-embassy/esp32c3", "esp-println/esp32c3", "esp-wifi/esp32c3", "portable-atomic/unsafe-assume-single-core"]
esp32c6 = ["esp-hal/esp32c6", "esp-backtrace/esp32c6", "esp-hal-embassy/esp32c6", "esp-println/esp32c6", "esp-wifi/esp32c6", "portable-atomic/critical-section"]
esp32h2 = ["esp-hal/esp32h2", "esp-backtrace/esp32h2", "esp-hal-embassy/esp32h2", "esp-println/esp32h2", "esp-wifi/esp32h2", "portable-atomic/critical-section"]
esp32s3 = ["esp-hal/esp32s3", "esp-backtrace/esp32s3", "esp-hal-embassy/esp32s3", "esp-println/esp32s3", "esp-wifi/esp32s3", "portable-atomic/critical-section"]

[profile.dev]
# Rust debug is too slow.
Expand Down
4 changes: 3 additions & 1 deletion rs-matter-embassy/src/ble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ use trouble_host::prelude::*;
use trouble_host::{self, Address, BleHostError, Controller, HostResources};

const MAX_CONNECTIONS: usize = MAX_BTP_SESSIONS;
const MAX_MTU_SIZE: usize = 251; // For now 512; // TODO const L2CAP_MTU: usize = 251;
// esp32c6 has a bug so we can't go lower than 255
// TODO: Make the MTU size a feature in future
const MAX_MTU_SIZE: usize = 255;
const MAX_CHANNELS: usize = 2;
const ADV_SETS: usize = 1;

Expand Down

0 comments on commit 70d1679

Please sign in to comment.