aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32-wpan/src/mm.rs46
1 files changed, 23 insertions, 23 deletions
diff --git a/embassy-stm32-wpan/src/mm.rs b/embassy-stm32-wpan/src/mm.rs
index 1ea6edeff..4ccae06f4 100644
--- a/embassy-stm32-wpan/src/mm.rs
+++ b/embassy-stm32-wpan/src/mm.rs
@@ -31,36 +31,36 @@ impl MemoryManager {
31 } 31 }
32 32
33 pub fn evt_drop(evt: *mut EvtPacket) { 33 pub fn evt_drop(evt: *mut EvtPacket) {
34 unsafe { 34 // unsafe {
35 let list_node = evt.cast(); 35 // let list_node = evt.cast();
36 36 //
37 LinkedListNode::insert_tail(LOCAL_FREE_BUF_QUEUE.as_mut_ptr(), list_node); 37 // LinkedListNode::insert_tail(LOCAL_FREE_BUF_QUEUE.as_mut_ptr(), list_node);
38 38 //
39 let channel_is_busy = Ipcc::c1_is_active_flag(channels::cpu1::IPCC_MM_RELEASE_BUFFER_CHANNEL); 39 // let channel_is_busy = Ipcc::c1_is_active_flag(channels::cpu1::IPCC_MM_RELEASE_BUFFER_CHANNEL);
40 40 //
41 // postpone event buffer freeing to IPCC interrupt handler 41 // // postpone event buffer freeing to IPCC interrupt handler
42 if channel_is_busy { 42 // if channel_is_busy {
43 Ipcc::c1_set_tx_channel(channels::cpu1::IPCC_MM_RELEASE_BUFFER_CHANNEL, true); 43 // Ipcc::c1_set_tx_channel(channels::cpu1::IPCC_MM_RELEASE_BUFFER_CHANNEL, true);
44 } else { 44 // } else {
45 Self::send_free_buf(); 45 // Self::send_free_buf();
46 Ipcc::c1_set_flag_channel(channels::cpu1::IPCC_MM_RELEASE_BUFFER_CHANNEL); 46 // Ipcc::c1_set_flag_channel(channels::cpu1::IPCC_MM_RELEASE_BUFFER_CHANNEL);
47 } 47 // }
48 } 48 // }
49 } 49 }
50 50
51 /// gives free event buffers back to CPU2 from local buffer queue 51 /// gives free event buffers back to CPU2 from local buffer queue
52 pub fn send_free_buf() { 52 pub fn send_free_buf() {
53 unsafe { 53 // unsafe {
54 while let Some(node_ptr) = LinkedListNode::remove_head(LOCAL_FREE_BUF_QUEUE.as_mut_ptr()) { 54 // while let Some(node_ptr) = LinkedListNode::remove_head(LOCAL_FREE_BUF_QUEUE.as_mut_ptr()) {
55 LinkedListNode::insert_head(FREE_BUF_QUEUE.as_mut_ptr(), node_ptr); 55 // LinkedListNode::insert_head(FREE_BUF_QUEUE.as_mut_ptr(), node_ptr);
56 } 56 // }
57 } 57 // }
58 } 58 }
59 59
60 /// free buffer channel interrupt handler 60 /// free buffer channel interrupt handler
61 pub fn free_buf_handler() { 61 pub fn free_buf_handler() {
62 Ipcc::c1_set_tx_channel(channels::cpu1::IPCC_MM_RELEASE_BUFFER_CHANNEL, false); 62 // Ipcc::c1_set_tx_channel(channels::cpu1::IPCC_MM_RELEASE_BUFFER_CHANNEL, false);
63 Self::send_free_buf(); 63 // Self::send_free_buf();
64 Ipcc::c1_set_flag_channel(channels::cpu1::IPCC_MM_RELEASE_BUFFER_CHANNEL); 64 // Ipcc::c1_set_flag_channel(channels::cpu1::IPCC_MM_RELEASE_BUFFER_CHANNEL);
65 } 65 }
66} 66}