aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32-wpan/Cargo.toml2
-rw-r--r--embassy-stm32-wpan/src/wb55/sub/ble.rs8
2 files changed, 3 insertions, 7 deletions
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"
46 46
47bit_field = "0.10.2" 47bit_field = "0.10.2"
48stm32-device-signature = { version = "0.3.3", features = ["stm32wb5x"] } 48stm32-device-signature = { version = "0.3.3", features = ["stm32wb5x"] }
49stm32wb-hci = { version = "0.17.0", optional = true } 49stm32wb-hci = { version = "0.17.3", optional = true }
50futures-util = { version = "0.3.30", default-features = false } 50futures-util = { version = "0.3.30", default-features = false }
51bitflags = { version = "2.3.3", optional = true } 51bitflags = { version = "2.3.3", optional = true }
52 52
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> {
130 self.tl_write(opcode.0, payload).await; 130 self.tl_write(opcode.0, payload).await;
131 } 131 }
132 132
133 #[allow(invalid_reference_casting)] 133 async fn controller_read_into(&mut self, buf: &mut [u8]) {
134 async fn controller_read_into(&self, buf: &mut [u8]) { 134 let evt_box = self.tl_read().await;
135 // A complete hack since I cannot update the trait
136 let s = unsafe { &mut *(self as *const _ as *mut Ble) };
137
138 let evt_box = s.tl_read().await;
139 let evt_serial = evt_box.serial(); 135 let evt_serial = evt_box.serial();
140 136
141 buf[..evt_serial.len()].copy_from_slice(evt_serial); 137 buf[..evt_serial.len()].copy_from_slice(evt_serial);