diff options
| author | Rick Rogers <[email protected]> | 2025-07-25 11:34:21 -0400 |
|---|---|---|
| committer | Rick Rogers <[email protected]> | 2025-07-25 11:34:21 -0400 |
| commit | 33fc82a455df058c5bdef23b68304a3dcb33f069 (patch) | |
| tree | 63f876b833e5ced8863b0b4825e8ab822190dd13 /examples | |
| parent | 24b2794931e73325ad969d83453d0cf872ac4775 (diff) | |
| parent | 996974e313fa5ec2c7c2d9dd0998fab244c0a180 (diff) | |
Merge branch 'main' into h7rs-xspi-fixes
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32wb/src/bin/gatt_server.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/stm32wb/src/bin/gatt_server.rs b/examples/stm32wb/src/bin/gatt_server.rs index 041dc0cf5..9864fa026 100644 --- a/examples/stm32wb/src/bin/gatt_server.rs +++ b/examples/stm32wb/src/bin/gatt_server.rs | |||
| @@ -27,6 +27,7 @@ use embassy_stm32_wpan::hci::vendor::event::{self, AttributeHandle, VendorEvent} | |||
| 27 | use embassy_stm32_wpan::hci::{BdAddr, Event}; | 27 | use embassy_stm32_wpan::hci::{BdAddr, Event}; |
| 28 | use embassy_stm32_wpan::lhci::LhciC1DeviceInformationCcrp; | 28 | use embassy_stm32_wpan::lhci::LhciC1DeviceInformationCcrp; |
| 29 | use embassy_stm32_wpan::sub::ble::Ble; | 29 | use embassy_stm32_wpan::sub::ble::Ble; |
| 30 | use embassy_stm32_wpan::sub::mm; | ||
| 30 | use embassy_stm32_wpan::TlMbox; | 31 | use embassy_stm32_wpan::TlMbox; |
| 31 | use {defmt_rtt as _, panic_probe as _}; | 32 | use {defmt_rtt as _, panic_probe as _}; |
| 32 | 33 | ||
| @@ -38,7 +39,7 @@ bind_interrupts!(struct Irqs{ | |||
| 38 | const BLE_GAP_DEVICE_NAME_LENGTH: u8 = 7; | 39 | const BLE_GAP_DEVICE_NAME_LENGTH: u8 = 7; |
| 39 | 40 | ||
| 40 | #[embassy_executor::main] | 41 | #[embassy_executor::main] |
| 41 | async fn main(_spawner: Spawner) { | 42 | async fn main(spawner: Spawner) { |
| 42 | /* | 43 | /* |
| 43 | How to make this work: | 44 | How to make this work: |
| 44 | 45 | ||
| @@ -70,6 +71,7 @@ async fn main(_spawner: Spawner) { | |||
| 70 | let config = Config::default(); | 71 | let config = Config::default(); |
| 71 | let mut mbox = TlMbox::init(p.IPCC, Irqs, config); | 72 | let mut mbox = TlMbox::init(p.IPCC, Irqs, config); |
| 72 | 73 | ||
| 74 | spawner.spawn(run_mm_queue(mbox.mm_subsystem)).unwrap(); | ||
| 73 | let sys_event = mbox.sys_subsystem.read().await; | 75 | let sys_event = mbox.sys_subsystem.read().await; |
| 74 | info!("sys event: {}", sys_event.payload()); | 76 | info!("sys event: {}", sys_event.payload()); |
| 75 | 77 | ||
| @@ -221,6 +223,11 @@ async fn main(_spawner: Spawner) { | |||
| 221 | } | 223 | } |
| 222 | } | 224 | } |
| 223 | 225 | ||
| 226 | #[embassy_executor::task] | ||
| 227 | async fn run_mm_queue(memory_manager: mm::MemoryManager) { | ||
| 228 | memory_manager.run_queue().await; | ||
| 229 | } | ||
| 230 | |||
| 224 | fn get_bd_addr() -> BdAddr { | 231 | fn get_bd_addr() -> BdAddr { |
| 225 | let mut bytes = [0u8; 6]; | 232 | let mut bytes = [0u8; 6]; |
| 226 | 233 | ||
