aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32-wpan/src/wb55/sub/sys.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-stm32-wpan/src/wb55/sub/sys.rs')
-rw-r--r--embassy-stm32-wpan/src/wb55/sub/sys.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/embassy-stm32-wpan/src/wb55/sub/sys.rs b/embassy-stm32-wpan/src/wb55/sub/sys.rs
index 4376314c7..2e625a677 100644
--- a/embassy-stm32-wpan/src/wb55/sub/sys.rs
+++ b/embassy-stm32-wpan/src/wb55/sub/sys.rs
@@ -87,10 +87,12 @@ impl<'a> Sys<'a> {
87 /// This method takes the place of the `HW_IPCC_SYS_EvtNot`/`SysUserEvtRx`/`APPE_SysUserEvtRx`, 87 /// This method takes the place of the `HW_IPCC_SYS_EvtNot`/`SysUserEvtRx`/`APPE_SysUserEvtRx`,
88 /// as the embassy implementation avoids the need to call C public bindings, and instead 88 /// as the embassy implementation avoids the need to call C public bindings, and instead
89 /// handles the event channels directly. 89 /// handles the event channels directly.
90 pub async fn read<'b>(&mut self) -> EvtBox<mm::MemoryManager<'b>> { 90 pub async fn read(&mut self) -> EvtBox<mm::MemoryManager<'_>> {
91 self.ipcc_system_event_channel 91 self.ipcc_system_event_channel
92 .receive(|| unsafe { 92 .receive(|| unsafe {
93 if let Some(node_ptr) = LinkedListNode::remove_head(SYSTEM_EVT_QUEUE.as_mut_ptr()) { 93 if let Some(node_ptr) =
94 critical_section::with(|cs| LinkedListNode::remove_head(cs, SYSTEM_EVT_QUEUE.as_mut_ptr()))
95 {
94 Some(EvtBox::new(node_ptr.cast())) 96 Some(EvtBox::new(node_ptr.cast()))
95 } else { 97 } else {
96 None 98 None