aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32-wpan/src
diff options
context:
space:
mode:
authorxoviat <[email protected]>2023-09-17 18:47:22 -0500
committerxoviat <[email protected]>2023-09-17 18:47:22 -0500
commitfeaeee1e835bf3e2a6b36fc8d2d45d4cbc5c27a3 (patch)
treeafff4cc7efde8203e78715a902898cbaf6bf061a /embassy-stm32-wpan/src
parenta6ef314be150fd2e8adbfefe5f2b38126f97551a (diff)
stm32: misc. cleanup
Diffstat (limited to 'embassy-stm32-wpan/src')
-rw-r--r--embassy-stm32-wpan/src/sub/ble.rs5
-rw-r--r--embassy-stm32-wpan/src/sub/mac.rs5
-rw-r--r--embassy-stm32-wpan/src/sub/mm.rs5
-rw-r--r--embassy-stm32-wpan/src/sub/sys.rs5
4 files changed, 8 insertions, 12 deletions
diff --git a/embassy-stm32-wpan/src/sub/ble.rs b/embassy-stm32-wpan/src/sub/ble.rs
index cd32692e1..c5f2334f4 100644
--- a/embassy-stm32-wpan/src/sub/ble.rs
+++ b/embassy-stm32-wpan/src/sub/ble.rs
@@ -1,4 +1,3 @@
1use core::marker::PhantomData;
2use core::ptr; 1use core::ptr;
3 2
4use embassy_stm32::ipcc::Ipcc; 3use embassy_stm32::ipcc::Ipcc;
@@ -13,7 +12,7 @@ use crate::unsafe_linked_list::LinkedListNode;
13use crate::{channels, evt}; 12use crate::{channels, evt};
14 13
15pub struct Ble { 14pub struct Ble {
16 phantom: PhantomData<Ble>, 15 _private: (),
17} 16}
18 17
19impl Ble { 18impl Ble {
@@ -29,7 +28,7 @@ impl Ble {
29 }); 28 });
30 } 29 }
31 30
32 Self { phantom: PhantomData } 31 Self { _private: () }
33 } 32 }
34 /// `HW_IPCC_BLE_EvtNot` 33 /// `HW_IPCC_BLE_EvtNot`
35 pub async fn tl_read(&self) -> EvtBox<Self> { 34 pub async fn tl_read(&self) -> EvtBox<Self> {
diff --git a/embassy-stm32-wpan/src/sub/mac.rs b/embassy-stm32-wpan/src/sub/mac.rs
index b0cf0248a..baf4da979 100644
--- a/embassy-stm32-wpan/src/sub/mac.rs
+++ b/embassy-stm32-wpan/src/sub/mac.rs
@@ -1,5 +1,4 @@
1use core::future::poll_fn; 1use core::future::poll_fn;
2use core::marker::PhantomData;
3use core::ptr; 2use core::ptr;
4use core::sync::atomic::{AtomicBool, Ordering}; 3use core::sync::atomic::{AtomicBool, Ordering};
5use core::task::Poll; 4use core::task::Poll;
@@ -21,12 +20,12 @@ static MAC_WAKER: AtomicWaker = AtomicWaker::new();
21static MAC_EVT_OUT: AtomicBool = AtomicBool::new(false); 20static MAC_EVT_OUT: AtomicBool = AtomicBool::new(false);
22 21
23pub struct Mac { 22pub struct Mac {
24 phantom: PhantomData<Mac>, 23 _private: (),
25} 24}
26 25
27impl Mac { 26impl Mac {
28 pub(crate) fn new() -> Self { 27 pub(crate) fn new() -> Self {
29 Self { phantom: PhantomData } 28 Self { _private: () }
30 } 29 }
31 30
32 /// `HW_IPCC_MAC_802_15_4_EvtNot` 31 /// `HW_IPCC_MAC_802_15_4_EvtNot`
diff --git a/embassy-stm32-wpan/src/sub/mm.rs b/embassy-stm32-wpan/src/sub/mm.rs
index da05ad1dd..4e4d2f854 100644
--- a/embassy-stm32-wpan/src/sub/mm.rs
+++ b/embassy-stm32-wpan/src/sub/mm.rs
@@ -1,6 +1,5 @@
1//! Memory manager routines 1//! Memory manager routines
2use core::future::poll_fn; 2use core::future::poll_fn;
3use core::marker::PhantomData;
4use core::mem::MaybeUninit; 3use core::mem::MaybeUninit;
5use core::task::Poll; 4use core::task::Poll;
6 5
@@ -21,7 +20,7 @@ static MM_WAKER: AtomicWaker = AtomicWaker::new();
21static mut LOCAL_FREE_BUF_QUEUE: Aligned<A4, MaybeUninit<LinkedListNode>> = Aligned(MaybeUninit::uninit()); 20static mut LOCAL_FREE_BUF_QUEUE: Aligned<A4, MaybeUninit<LinkedListNode>> = Aligned(MaybeUninit::uninit());
22 21
23pub struct MemoryManager { 22pub struct MemoryManager {
24 phantom: PhantomData<MemoryManager>, 23 _private: (),
25} 24}
26 25
27impl MemoryManager { 26impl MemoryManager {
@@ -44,7 +43,7 @@ impl MemoryManager {
44 }); 43 });
45 } 44 }
46 45
47 Self { phantom: PhantomData } 46 Self { _private: () }
48 } 47 }
49 48
50 pub async fn run_queue(&self) { 49 pub async fn run_queue(&self) {
diff --git a/embassy-stm32-wpan/src/sub/sys.rs b/embassy-stm32-wpan/src/sub/sys.rs
index c17fd531d..bd2ea3f74 100644
--- a/embassy-stm32-wpan/src/sub/sys.rs
+++ b/embassy-stm32-wpan/src/sub/sys.rs
@@ -1,4 +1,3 @@
1use core::marker::PhantomData;
2use core::ptr; 1use core::ptr;
3 2
4use crate::cmd::CmdPacket; 3use crate::cmd::CmdPacket;
@@ -12,7 +11,7 @@ use crate::unsafe_linked_list::LinkedListNode;
12use crate::{channels, Ipcc, SYSTEM_EVT_QUEUE, SYS_CMD_BUF, TL_DEVICE_INFO_TABLE, TL_SYS_TABLE}; 11use crate::{channels, Ipcc, SYSTEM_EVT_QUEUE, SYS_CMD_BUF, TL_DEVICE_INFO_TABLE, TL_SYS_TABLE};
13 12
14pub struct Sys { 13pub struct Sys {
15 phantom: PhantomData<Sys>, 14 _private: (),
16} 15}
17 16
18impl Sys { 17impl Sys {
@@ -27,7 +26,7 @@ impl Sys {
27 }); 26 });
28 } 27 }
29 28
30 Self { phantom: PhantomData } 29 Self { _private: () }
31 } 30 }
32 31
33 /// Returns CPU2 wireless firmware information (if present). 32 /// Returns CPU2 wireless firmware information (if present).