aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32-wpan/src/sub/sys.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-stm32-wpan/src/sub/sys.rs')
-rw-r--r--embassy-stm32-wpan/src/sub/sys.rs17
1 files changed, 5 insertions, 12 deletions
diff --git a/embassy-stm32-wpan/src/sub/sys.rs b/embassy-stm32-wpan/src/sub/sys.rs
index 8a3382f86..549811685 100644
--- a/embassy-stm32-wpan/src/sub/sys.rs
+++ b/embassy-stm32-wpan/src/sub/sys.rs
@@ -1,10 +1,9 @@
1use core::ptr;
2
3use crate::cmd::CmdPacket; 1use crate::cmd::CmdPacket;
4use crate::consts::TlPacketType; 2use crate::consts::TlPacketType;
5use crate::evt::{CcEvt, EvtBox, EvtPacket}; 3use crate::evt::EvtBox;
6#[allow(unused_imports)] 4#[cfg(feature = "ble")]
7use crate::shci::{SchiCommandStatus, ShciBleInitCmdParam, ShciOpcode}; 5use crate::shci::ShciBleInitCmdParam;
6use crate::shci::{SchiCommandStatus, ShciOpcode};
8use crate::sub::mm; 7use crate::sub::mm;
9use crate::tables::{SysTable, WirelessFwInfoTable}; 8use crate::tables::{SysTable, WirelessFwInfoTable};
10use crate::unsafe_linked_list::LinkedListNode; 9use crate::unsafe_linked_list::LinkedListNode;
@@ -50,13 +49,7 @@ impl Sys {
50 self.write(opcode, payload).await; 49 self.write(opcode, payload).await;
51 Ipcc::flush(channels::cpu1::IPCC_SYSTEM_CMD_RSP_CHANNEL).await; 50 Ipcc::flush(channels::cpu1::IPCC_SYSTEM_CMD_RSP_CHANNEL).await;
52 51
53 unsafe { 52 unsafe { SchiCommandStatus::from_packet(SYS_CMD_BUF.as_ptr()) }
54 let p_event_packet = SYS_CMD_BUF.as_ptr() as *const EvtPacket;
55 let p_command_event = &((*p_event_packet).evt_serial.evt.payload) as *const _ as *const CcEvt;
56 let p_payload = &((*p_command_event).payload) as *const u8;
57
58 ptr::read_volatile(p_payload).try_into()
59 }
60 } 53 }
61 54
62 #[cfg(feature = "mac")] 55 #[cfg(feature = "mac")]