aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32-wpan/src/lib.rs3
-rw-r--r--embassy-stm32-wpan/src/mac/commands.rs (renamed from embassy-stm32-wpan/src/sub/mac/commands.rs)0
-rw-r--r--embassy-stm32-wpan/src/mac/consts.rs (renamed from embassy-stm32-wpan/src/sub/mac/consts.rs)0
-rw-r--r--embassy-stm32-wpan/src/mac/event.rs (renamed from embassy-stm32-wpan/src/sub/mac/event.rs)2
-rw-r--r--embassy-stm32-wpan/src/mac/helpers.rs (renamed from embassy-stm32-wpan/src/sub/mac/helpers.rs)0
-rw-r--r--embassy-stm32-wpan/src/mac/indications.rs (renamed from embassy-stm32-wpan/src/sub/mac/indications.rs)0
-rw-r--r--embassy-stm32-wpan/src/mac/macros.rs (renamed from embassy-stm32-wpan/src/sub/mac/macros.rs)0
-rw-r--r--embassy-stm32-wpan/src/mac/mod.rs9
-rw-r--r--embassy-stm32-wpan/src/mac/opcodes.rs (renamed from embassy-stm32-wpan/src/sub/mac/opcodes.rs)0
-rw-r--r--embassy-stm32-wpan/src/mac/responses.rs (renamed from embassy-stm32-wpan/src/sub/mac/responses.rs)0
-rw-r--r--embassy-stm32-wpan/src/mac/typedefs.rs (renamed from embassy-stm32-wpan/src/sub/mac/typedefs.rs)0
-rw-r--r--embassy-stm32-wpan/src/sub/mac.rs (renamed from embassy-stm32-wpan/src/sub/mac/mod.rs)16
-rw-r--r--examples/stm32wb/src/bin/mac_ffd.rs6
-rw-r--r--examples/stm32wb/src/bin/mac_rfd.rs6
-rw-r--r--tests/stm32/src/bin/wpan_mac.rs6
15 files changed, 25 insertions, 23 deletions
diff --git a/embassy-stm32-wpan/src/lib.rs b/embassy-stm32-wpan/src/lib.rs
index 3a45c5978..57f0dc4fa 100644
--- a/embassy-stm32-wpan/src/lib.rs
+++ b/embassy-stm32-wpan/src/lib.rs
@@ -26,6 +26,9 @@ pub mod sub;
26pub mod tables; 26pub mod tables;
27pub mod unsafe_linked_list; 27pub mod unsafe_linked_list;
28 28
29#[cfg(feature = "mac")]
30pub mod mac;
31
29#[cfg(feature = "ble")] 32#[cfg(feature = "ble")]
30pub use crate::sub::ble::hci; 33pub use crate::sub::ble::hci;
31 34
diff --git a/embassy-stm32-wpan/src/sub/mac/commands.rs b/embassy-stm32-wpan/src/mac/commands.rs
index 8cfa0a054..8cfa0a054 100644
--- a/embassy-stm32-wpan/src/sub/mac/commands.rs
+++ b/embassy-stm32-wpan/src/mac/commands.rs
diff --git a/embassy-stm32-wpan/src/sub/mac/consts.rs b/embassy-stm32-wpan/src/mac/consts.rs
index 56903d980..56903d980 100644
--- a/embassy-stm32-wpan/src/sub/mac/consts.rs
+++ b/embassy-stm32-wpan/src/mac/consts.rs
diff --git a/embassy-stm32-wpan/src/sub/mac/event.rs b/embassy-stm32-wpan/src/mac/event.rs
index aaf965565..dfce21fea 100644
--- a/embassy-stm32-wpan/src/sub/mac/event.rs
+++ b/embassy-stm32-wpan/src/mac/event.rs
@@ -7,7 +7,7 @@ use super::responses::{
7 AssociateConfirm, CalibrateConfirm, DataConfirm, DisassociateConfirm, DpsConfirm, GetConfirm, GtsConfirm, 7 AssociateConfirm, CalibrateConfirm, DataConfirm, DisassociateConfirm, DpsConfirm, GetConfirm, GtsConfirm,
8 PollConfirm, PurgeConfirm, ResetConfirm, RxEnableConfirm, ScanConfirm, SetConfirm, SoundingConfirm, StartConfirm, 8 PollConfirm, PurgeConfirm, ResetConfirm, RxEnableConfirm, ScanConfirm, SetConfirm, SoundingConfirm, StartConfirm,
9}; 9};
10use crate::sub::mac::opcodes::OpcodeM0ToM4; 10use crate::mac::opcodes::OpcodeM0ToM4;
11 11
12pub trait ParseableMacEvent { 12pub trait ParseableMacEvent {
13 const SIZE: usize; 13 const SIZE: usize;
diff --git a/embassy-stm32-wpan/src/sub/mac/helpers.rs b/embassy-stm32-wpan/src/mac/helpers.rs
index 5a5bf8a85..5a5bf8a85 100644
--- a/embassy-stm32-wpan/src/sub/mac/helpers.rs
+++ b/embassy-stm32-wpan/src/mac/helpers.rs
diff --git a/embassy-stm32-wpan/src/sub/mac/indications.rs b/embassy-stm32-wpan/src/mac/indications.rs
index 6df4aa23a..6df4aa23a 100644
--- a/embassy-stm32-wpan/src/sub/mac/indications.rs
+++ b/embassy-stm32-wpan/src/mac/indications.rs
diff --git a/embassy-stm32-wpan/src/sub/mac/macros.rs b/embassy-stm32-wpan/src/mac/macros.rs
index 1a988a779..1a988a779 100644
--- a/embassy-stm32-wpan/src/sub/mac/macros.rs
+++ b/embassy-stm32-wpan/src/mac/macros.rs
diff --git a/embassy-stm32-wpan/src/mac/mod.rs b/embassy-stm32-wpan/src/mac/mod.rs
new file mode 100644
index 000000000..1af8fe6ba
--- /dev/null
+++ b/embassy-stm32-wpan/src/mac/mod.rs
@@ -0,0 +1,9 @@
1pub mod commands;
2mod consts;
3pub mod event;
4mod helpers;
5pub mod indications;
6mod macros;
7mod opcodes;
8pub mod responses;
9pub mod typedefs;
diff --git a/embassy-stm32-wpan/src/sub/mac/opcodes.rs b/embassy-stm32-wpan/src/mac/opcodes.rs
index fd7011873..fd7011873 100644
--- a/embassy-stm32-wpan/src/sub/mac/opcodes.rs
+++ b/embassy-stm32-wpan/src/mac/opcodes.rs
diff --git a/embassy-stm32-wpan/src/sub/mac/responses.rs b/embassy-stm32-wpan/src/mac/responses.rs
index 2f6f5bf58..2f6f5bf58 100644
--- a/embassy-stm32-wpan/src/sub/mac/responses.rs
+++ b/embassy-stm32-wpan/src/mac/responses.rs
diff --git a/embassy-stm32-wpan/src/sub/mac/typedefs.rs b/embassy-stm32-wpan/src/mac/typedefs.rs
index 30c7731b2..30c7731b2 100644
--- a/embassy-stm32-wpan/src/sub/mac/typedefs.rs
+++ b/embassy-stm32-wpan/src/mac/typedefs.rs
diff --git a/embassy-stm32-wpan/src/sub/mac/mod.rs b/embassy-stm32-wpan/src/sub/mac.rs
index ab39f89c2..4893cb47b 100644
--- a/embassy-stm32-wpan/src/sub/mac/mod.rs
+++ b/embassy-stm32-wpan/src/sub/mac.rs
@@ -8,25 +8,15 @@ use embassy_futures::poll_once;
8use embassy_stm32::ipcc::Ipcc; 8use embassy_stm32::ipcc::Ipcc;
9use embassy_sync::waitqueue::AtomicWaker; 9use embassy_sync::waitqueue::AtomicWaker;
10 10
11use self::commands::MacCommand;
12use self::event::MacEvent;
13use self::typedefs::MacError;
14use crate::cmd::CmdPacket; 11use crate::cmd::CmdPacket;
15use crate::consts::TlPacketType; 12use crate::consts::TlPacketType;
16use crate::evt::{EvtBox, EvtPacket}; 13use crate::evt::{EvtBox, EvtPacket};
14use crate::mac::commands::MacCommand;
15use crate::mac::event::MacEvent;
16use crate::mac::typedefs::MacError;
17use crate::tables::{MAC_802_15_4_CMD_BUFFER, MAC_802_15_4_NOTIF_RSP_EVT_BUFFER}; 17use crate::tables::{MAC_802_15_4_CMD_BUFFER, MAC_802_15_4_NOTIF_RSP_EVT_BUFFER};
18use crate::{channels, evt}; 18use crate::{channels, evt};
19 19
20pub mod commands;
21mod consts;
22pub mod event;
23mod helpers;
24pub mod indications;
25mod macros;
26mod opcodes;
27pub mod responses;
28pub mod typedefs;
29
30static MAC_WAKER: AtomicWaker = AtomicWaker::new(); 20static MAC_WAKER: AtomicWaker = AtomicWaker::new();
31static MAC_EVT_OUT: AtomicBool = AtomicBool::new(false); 21static MAC_EVT_OUT: AtomicBool = AtomicBool::new(false);
32 22
diff --git a/examples/stm32wb/src/bin/mac_ffd.rs b/examples/stm32wb/src/bin/mac_ffd.rs
index 689a28353..e4d81997e 100644
--- a/examples/stm32wb/src/bin/mac_ffd.rs
+++ b/examples/stm32wb/src/bin/mac_ffd.rs
@@ -6,9 +6,9 @@ use defmt::*;
6use embassy_executor::Spawner; 6use embassy_executor::Spawner;
7use embassy_stm32::bind_interrupts; 7use embassy_stm32::bind_interrupts;
8use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; 8use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler};
9use embassy_stm32_wpan::sub::mac::commands::{AssociateResponse, ResetRequest, SetRequest, StartRequest}; 9use embassy_stm32_wpan::mac::commands::{AssociateResponse, ResetRequest, SetRequest, StartRequest};
10use embassy_stm32_wpan::sub::mac::event::MacEvent; 10use embassy_stm32_wpan::mac::event::MacEvent;
11use embassy_stm32_wpan::sub::mac::typedefs::{MacChannel, MacStatus, PanId, PibId, SecurityLevel}; 11use embassy_stm32_wpan::mac::typedefs::{MacChannel, MacStatus, PanId, PibId, SecurityLevel};
12use embassy_stm32_wpan::sub::mm; 12use embassy_stm32_wpan::sub::mm;
13use embassy_stm32_wpan::TlMbox; 13use embassy_stm32_wpan::TlMbox;
14use {defmt_rtt as _, panic_probe as _}; 14use {defmt_rtt as _, panic_probe as _};
diff --git a/examples/stm32wb/src/bin/mac_rfd.rs b/examples/stm32wb/src/bin/mac_rfd.rs
index ea349f9a8..b2dac72cc 100644
--- a/examples/stm32wb/src/bin/mac_rfd.rs
+++ b/examples/stm32wb/src/bin/mac_rfd.rs
@@ -6,9 +6,9 @@ use defmt::*;
6use embassy_executor::Spawner; 6use embassy_executor::Spawner;
7use embassy_stm32::bind_interrupts; 7use embassy_stm32::bind_interrupts;
8use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; 8use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler};
9use embassy_stm32_wpan::sub::mac::commands::{AssociateRequest, DataRequest, GetRequest, ResetRequest, SetRequest}; 9use embassy_stm32_wpan::mac::commands::{AssociateRequest, DataRequest, GetRequest, ResetRequest, SetRequest};
10use embassy_stm32_wpan::sub::mac::event::MacEvent; 10use embassy_stm32_wpan::mac::event::MacEvent;
11use embassy_stm32_wpan::sub::mac::typedefs::{ 11use embassy_stm32_wpan::mac::typedefs::{
12 AddressMode, Capabilities, KeyIdMode, MacAddress, MacChannel, PanId, PibId, SecurityLevel, 12 AddressMode, Capabilities, KeyIdMode, MacAddress, MacChannel, PanId, PibId, SecurityLevel,
13}; 13};
14use embassy_stm32_wpan::sub::mm; 14use embassy_stm32_wpan::sub::mm;
diff --git a/tests/stm32/src/bin/wpan_mac.rs b/tests/stm32/src/bin/wpan_mac.rs
index d97a4d404..cfa0aca3b 100644
--- a/tests/stm32/src/bin/wpan_mac.rs
+++ b/tests/stm32/src/bin/wpan_mac.rs
@@ -10,9 +10,9 @@ use common::*;
10use embassy_executor::Spawner; 10use embassy_executor::Spawner;
11use embassy_stm32::bind_interrupts; 11use embassy_stm32::bind_interrupts;
12use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler}; 12use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler};
13use embassy_stm32_wpan::sub::mac::commands::{AssociateRequest, GetRequest, ResetRequest, SetRequest}; 13use embassy_stm32_wpan::mac::commands::{AssociateRequest, GetRequest, ResetRequest, SetRequest};
14use embassy_stm32_wpan::sub::mac::event::MacEvent; 14use embassy_stm32_wpan::mac::event::MacEvent;
15use embassy_stm32_wpan::sub::mac::typedefs::{ 15use embassy_stm32_wpan::mac::typedefs::{
16 AddressMode, Capabilities, KeyIdMode, MacAddress, MacChannel, PanId, PibId, SecurityLevel, 16 AddressMode, Capabilities, KeyIdMode, MacAddress, MacChannel, PanId, PibId, SecurityLevel,
17}; 17};
18use embassy_stm32_wpan::sub::mm; 18use embassy_stm32_wpan::sub::mm;