aboutsummaryrefslogtreecommitdiff
path: root/tests/stm32
diff options
context:
space:
mode:
authorxoviat <[email protected]>2023-06-17 14:38:36 -0500
committerxoviat <[email protected]>2023-06-17 14:38:36 -0500
commitc7b0df569b02bee80de808a5b0ad69df3d32d84c (patch)
tree2599747a66f1e50c594c2ec22a425fefb84f115b /tests/stm32
parent041a4a4208dae563ab22f9986391509f4b90f740 (diff)
stm32/wpan: modify evtbox to use slice view
Diffstat (limited to 'tests/stm32')
-rw-r--r--tests/stm32/src/bin/tl_mbox.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/stm32/src/bin/tl_mbox.rs b/tests/stm32/src/bin/tl_mbox.rs
index bb38204b6..259889e35 100644
--- a/tests/stm32/src/bin/tl_mbox.rs
+++ b/tests/stm32/src/bin/tl_mbox.rs
@@ -6,6 +6,8 @@
6#[path = "../common.rs"] 6#[path = "../common.rs"]
7mod common; 7mod common;
8 8
9use core::mem;
10
9use common::*; 11use common::*;
10use embassy_executor::Spawner; 12use embassy_executor::Spawner;
11use embassy_futures::poll_once; 13use embassy_futures::poll_once;
@@ -36,12 +38,13 @@ async fn main(spawner: Spawner) {
36 let config = Config::default(); 38 let config = Config::default();
37 let mbox = TlMbox::init(p.IPCC, Irqs, config); 39 let mbox = TlMbox::init(p.IPCC, Irqs, config);
38 40
39 let mut rx_buf = [0u8; 500];
40 let ready_event = Sys::read().await; 41 let ready_event = Sys::read().await;
41 let _ = poll_once(Sys::read()); // clear rx not 42 let _ = poll_once(Sys::read()); // clear rx not
42 ready_event.write(&mut rx_buf).unwrap();
43 43
44 info!("coprocessor ready {}", rx_buf); 44 info!("coprocessor ready {}", ready_event.payload());
45
46 // test memory manager
47 mem::drop(ready_event);
45 48
46 loop { 49 loop {
47 let wireless_fw_info = mbox.wireless_fw_info(); 50 let wireless_fw_info = mbox.wireless_fw_info();
@@ -74,11 +77,10 @@ async fn main(spawner: Spawner) {
74 77
75 info!("waiting for ble..."); 78 info!("waiting for ble...");
76 let ble_event = Ble::read().await; 79 let ble_event = Ble::read().await;
77 ble_event.write(&mut rx_buf).unwrap();
78 80
79 info!("ble event: {}", rx_buf); 81 info!("ble event: {}", ble_event.payload());
80 82
81 // Timer::after(Duration::from_secs(3)).await; 83 Timer::after(Duration::from_millis(150)).await;
82 info!("Test OK"); 84 info!("Test OK");
83 cortex_m::asm::bkpt(); 85 cortex_m::asm::bkpt();
84} 86}