aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32wb
diff options
context:
space:
mode:
authorgoueslati <[email protected]>2023-06-12 12:27:51 +0100
committergoueslati <[email protected]>2023-06-12 12:27:51 +0100
commitca8957da435eb91242fa33eb986e80a33bbc4da0 (patch)
tree89b66bdff52630cd4ef1d609122c2b04417ccd73 /examples/stm32wb
parentce1d72c609ae1e04410e68458ec3d6c36c7dae27 (diff)
stm32/ipcc: move tl_mbox into `embassy-stm32-wpan`
Diffstat (limited to 'examples/stm32wb')
-rw-r--r--examples/stm32wb/src/bin/tl_mbox_tx_rx.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/stm32wb/src/bin/tl_mbox_tx_rx.rs b/examples/stm32wb/src/bin/tl_mbox_tx_rx.rs
index 0525d3f37..3132ab3e4 100644
--- a/examples/stm32wb/src/bin/tl_mbox_tx_rx.rs
+++ b/examples/stm32wb/src/bin/tl_mbox_tx_rx.rs
@@ -4,15 +4,15 @@
4 4
5use defmt::*; 5use defmt::*;
6use embassy_executor::Spawner; 6use embassy_executor::Spawner;
7use embassy_stm32::tl_mbox::hci::RadioCoprocessor; 7use embassy_stm32::bind_interrupts;
8use embassy_stm32::tl_mbox::ipcc::Config; 8use embassy_stm32::ipcc::Config;
9use embassy_stm32::tl_mbox::TlMbox; 9use embassy_stm32_wpan::rc::RadioCoprocessor;
10use embassy_stm32::{bind_interrupts, tl_mbox}; 10use embassy_stm32_wpan::TlMbox;
11use {defmt_rtt as _, panic_probe as _}; 11use {defmt_rtt as _, panic_probe as _};
12 12
13bind_interrupts!(struct Irqs{ 13bind_interrupts!(struct Irqs{
14 IPCC_C1_RX => tl_mbox::ReceiveInterruptHandler; 14 IPCC_C1_RX => embassy_stm32_wpan::ReceiveInterruptHandler;
15 IPCC_C1_TX => tl_mbox::TransmitInterruptHandler; 15 IPCC_C1_TX => embassy_stm32_wpan::TransmitInterruptHandler;
16}); 16});
17 17
18#[embassy_executor::main] 18#[embassy_executor::main]
@@ -45,16 +45,16 @@ async fn main(_spawner: Spawner) {
45 info!("Hello World!"); 45 info!("Hello World!");
46 46
47 let config = Config::default(); 47 let config = Config::default();
48 let mbox = TlMbox::new(p.IPCC, Irqs, config); 48 let mbox = TlMbox::init(p.IPCC, Irqs, config);
49 49
50 let mut rc = RadioCoprocessor::new(mbox, Default::default()); 50 let mut rc = RadioCoprocessor::new(mbox);
51 rc.write(&[0x01, 0x03, 0x0c, 0x00, 0x00]).unwrap();
52 51
53 let response = rc.read().await; 52 let response = rc.read().await;
54 info!("coprocessor ready {}", response); 53 info!("coprocessor ready {}", response);
55 54
55 rc.write(&[0x01, 0x03, 0x0c, 0x00, 0x00]);
56 let response = rc.read().await; 56 let response = rc.read().await;
57 info!("coprocessor ready {}", response); 57 info!("ble reset rsp {}", response);
58 58
59 info!("Test OK"); 59 info!("Test OK");
60 cortex_m::asm::bkpt(); 60 cortex_m::asm::bkpt();