From 75f728aec9018e290d33910dde45b32bfe55b86f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Quentin?= Date: Wed, 4 Jun 2025 16:26:59 +0200 Subject: [PATCH] esp-wifi: Fix ble + coex + defmt for ESP32 (#3596) * Make CI fail as it should * Fix ESP32 + defmt + ble + coex * CHANGELOG --- esp-wifi/CHANGELOG.md | 1 + esp-wifi/src/ble/os_adapter_esp32.rs | 11 +++++------ xtask/src/lib.rs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/esp-wifi/CHANGELOG.md b/esp-wifi/CHANGELOG.md index b1baf15d8..41954b1a4 100644 --- a/esp-wifi/CHANGELOG.md +++ b/esp-wifi/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fix a compilation error for ESP32 + coex + ble + defmt (#3596) ### Removed diff --git a/esp-wifi/src/ble/os_adapter_esp32.rs b/esp-wifi/src/ble/os_adapter_esp32.rs index 1261c7c84..7792eae73 100644 --- a/esp-wifi/src/ble/os_adapter_esp32.rs +++ b/esp-wifi/src/ble/os_adapter_esp32.rs @@ -633,7 +633,7 @@ pub(crate) const BTDM_ASYNC_WAKEUP_REQ_COEX: i32 = 1; /// ************************************************************************* #[cfg(coex)] pub(crate) fn async_wakeup_request(event: i32) -> bool { - trace!("async_wakeup_request {event}"); + trace!("async_wakeup_request {}", event); unsafe extern "C" { fn btdm_in_wakeup_requesting_set(set: bool); @@ -643,7 +643,7 @@ pub(crate) fn async_wakeup_request(event: i32) -> bool { fn btdm_wakeup_request(); } - let request_lock = match event { + match event { e if e == BTDM_ASYNC_WAKEUP_REQ_HCI => { unsafe { btdm_in_wakeup_requesting_set(true); @@ -664,9 +664,8 @@ pub(crate) fn async_wakeup_request(event: i32) -> bool { false } } - _ => return false, - }; - request_lock + _ => false, + } } /// ************************************************************************** @@ -684,7 +683,7 @@ pub(crate) fn async_wakeup_request(event: i32) -> bool { /// ************************************************************************* #[cfg(coex)] pub(crate) fn async_wakeup_request_end(event: i32) { - trace!("async_wakeup_request_end {event}"); + trace!("async_wakeup_request_end {}", event); let request_lock = match event { e if e == BTDM_ASYNC_WAKEUP_REQ_HCI => true, diff --git a/xtask/src/lib.rs b/xtask/src/lib.rs index f089de765..433522392 100644 --- a/xtask/src/lib.rs +++ b/xtask/src/lib.rs @@ -146,10 +146,10 @@ impl Package { features.push("smoltcp/proto-ipv4".to_owned()); features.push("smoltcp/proto-ipv6".to_owned()); } - if config.contains("ble") { + if config.contains("bt") { features.push("ble".to_owned()); } - if config.contains("coex") { + if config.contains("wifi") && config.contains("bt") { features.push("coex".to_owned()); } }