diff options
Diffstat (limited to 'embassy-stm32-wpan/src/sub/sys.rs')
| -rw-r--r-- | embassy-stm32-wpan/src/sub/sys.rs | 17 |
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 @@ | |||
| 1 | use core::ptr; | ||
| 2 | |||
| 3 | use crate::cmd::CmdPacket; | 1 | use crate::cmd::CmdPacket; |
| 4 | use crate::consts::TlPacketType; | 2 | use crate::consts::TlPacketType; |
| 5 | use crate::evt::{CcEvt, EvtBox, EvtPacket}; | 3 | use crate::evt::EvtBox; |
| 6 | #[allow(unused_imports)] | 4 | #[cfg(feature = "ble")] |
| 7 | use crate::shci::{SchiCommandStatus, ShciBleInitCmdParam, ShciOpcode}; | 5 | use crate::shci::ShciBleInitCmdParam; |
| 6 | use crate::shci::{SchiCommandStatus, ShciOpcode}; | ||
| 8 | use crate::sub::mm; | 7 | use crate::sub::mm; |
| 9 | use crate::tables::{SysTable, WirelessFwInfoTable}; | 8 | use crate::tables::{SysTable, WirelessFwInfoTable}; |
| 10 | use crate::unsafe_linked_list::LinkedListNode; | 9 | use 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")] |
