diff options
| -rw-r--r-- | embassy-stm32-wpan/src/sys.rs | 6 | ||||
| -rw-r--r-- | examples/stm32wb/src/bin/tl_mbox_mac.rs | 18 |
2 files changed, 15 insertions, 9 deletions
diff --git a/embassy-stm32-wpan/src/sys.rs b/embassy-stm32-wpan/src/sys.rs index 5fe09a20f..65a64e090 100644 --- a/embassy-stm32-wpan/src/sys.rs +++ b/embassy-stm32-wpan/src/sys.rs | |||
| @@ -61,6 +61,12 @@ impl Sys { | |||
| 61 | } | 61 | } |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | #[cfg(feature = "mac")] | ||
| 65 | pub async fn shci_c2_mac_802_15_4_init(&self) -> SchiCommandStatus { | ||
| 66 | self.write_and_get_response(ShciOpcode::Mac802_15_4Init, &[]).await | ||
| 67 | } | ||
| 68 | |||
| 69 | #[cfg(feature = "ble")] | ||
| 64 | pub async fn shci_c2_ble_init(&self, param: ShciBleInitCmdParam) -> SchiCommandStatus { | 70 | pub async fn shci_c2_ble_init(&self, param: ShciBleInitCmdParam) -> SchiCommandStatus { |
| 65 | self.write_and_get_response(ShciOpcode::BleInit, param.payload()).await | 71 | self.write_and_get_response(ShciOpcode::BleInit, param.payload()).await |
| 66 | } | 72 | } |
diff --git a/examples/stm32wb/src/bin/tl_mbox_mac.rs b/examples/stm32wb/src/bin/tl_mbox_mac.rs index f13f260b5..a42939bbd 100644 --- a/examples/stm32wb/src/bin/tl_mbox_mac.rs +++ b/examples/stm32wb/src/bin/tl_mbox_mac.rs | |||
| @@ -49,15 +49,15 @@ async fn main(_spawner: Spawner) { | |||
| 49 | let sys_event = mbox.sys_subsystem.read().await; | 49 | let sys_event = mbox.sys_subsystem.read().await; |
| 50 | info!("sys event: {}", sys_event.payload()); | 50 | info!("sys event: {}", sys_event.payload()); |
| 51 | 51 | ||
| 52 | // mbox.sys_subsystem.shci_c2_ble_init(Default::default()).await; | 52 | mbox.sys_subsystem.shci_c2_mac_802_15_4_init().await; |
| 53 | // | 53 | // |
| 54 | // info!("starting ble..."); | 54 | // info!("starting ble..."); |
| 55 | // mbox.ble_subsystem.write(0x0c, &[]).await; | 55 | // mbox.ble_subsystem.write(0x0c, &[]).await; |
| 56 | // | 56 | // |
| 57 | // info!("waiting for ble..."); | 57 | // info!("waiting for ble..."); |
| 58 | // let ble_event = mbox.ble_subsystem.read().await; | 58 | // let ble_event = mbox.ble_subsystem.read().await; |
| 59 | // | 59 | // |
| 60 | // info!("ble event: {}", ble_event.payload()); | 60 | // info!("ble event: {}", ble_event.payload()); |
| 61 | 61 | ||
| 62 | info!("Test OK"); | 62 | info!("Test OK"); |
| 63 | cortex_m::asm::bkpt(); | 63 | cortex_m::asm::bkpt(); |
