From 18247d9900a16e94e0983e6ee80dda13f012b1a4 Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 15 Dec 2025 10:53:32 -0600 Subject: wpan: update stm32wb-hci --- embassy-stm32-wpan/Cargo.toml | 2 +- embassy-stm32-wpan/src/wb55/sub/ble.rs | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'embassy-stm32-wpan') diff --git a/embassy-stm32-wpan/Cargo.toml b/embassy-stm32-wpan/Cargo.toml index 9624c7932..1be48e893 100644 --- a/embassy-stm32-wpan/Cargo.toml +++ b/embassy-stm32-wpan/Cargo.toml @@ -46,7 +46,7 @@ critical-section = "1.2" bit_field = "0.10.2" stm32-device-signature = { version = "0.3.3", features = ["stm32wb5x"] } -stm32wb-hci = { version = "0.17.0", optional = true } +stm32wb-hci = { version = "0.17.3", optional = true } futures-util = { version = "0.3.30", default-features = false } bitflags = { version = "2.3.3", optional = true } diff --git a/embassy-stm32-wpan/src/wb55/sub/ble.rs b/embassy-stm32-wpan/src/wb55/sub/ble.rs index a2558d735..a822d6530 100644 --- a/embassy-stm32-wpan/src/wb55/sub/ble.rs +++ b/embassy-stm32-wpan/src/wb55/sub/ble.rs @@ -130,12 +130,8 @@ impl<'a> hci::Controller for Ble<'a> { self.tl_write(opcode.0, payload).await; } - #[allow(invalid_reference_casting)] - async fn controller_read_into(&self, buf: &mut [u8]) { - // A complete hack since I cannot update the trait - let s = unsafe { &mut *(self as *const _ as *mut Ble) }; - - let evt_box = s.tl_read().await; + async fn controller_read_into(&mut self, buf: &mut [u8]) { + let evt_box = self.tl_read().await; let evt_serial = evt_box.serial(); buf[..evt_serial.len()].copy_from_slice(evt_serial); -- cgit