wpan: factor mac logic into other mod
This commit is contained in:
@ -26,6 +26,9 @@ pub mod sub;
|
||||
pub mod tables;
|
||||
pub mod unsafe_linked_list;
|
||||
|
||||
#[cfg(feature = "mac")]
|
||||
pub mod mac;
|
||||
|
||||
#[cfg(feature = "ble")]
|
||||
pub use crate::sub::ble::hci;
|
||||
|
||||
|
@ -7,7 +7,7 @@ use super::responses::{
|
||||
AssociateConfirm, CalibrateConfirm, DataConfirm, DisassociateConfirm, DpsConfirm, GetConfirm, GtsConfirm,
|
||||
PollConfirm, PurgeConfirm, ResetConfirm, RxEnableConfirm, ScanConfirm, SetConfirm, SoundingConfirm, StartConfirm,
|
||||
};
|
||||
use crate::sub::mac::opcodes::OpcodeM0ToM4;
|
||||
use crate::mac::opcodes::OpcodeM0ToM4;
|
||||
|
||||
pub trait ParseableMacEvent {
|
||||
const SIZE: usize;
|
9
embassy-stm32-wpan/src/mac/mod.rs
Normal file
9
embassy-stm32-wpan/src/mac/mod.rs
Normal file
@ -0,0 +1,9 @@
|
||||
pub mod commands;
|
||||
mod consts;
|
||||
pub mod event;
|
||||
mod helpers;
|
||||
pub mod indications;
|
||||
mod macros;
|
||||
mod opcodes;
|
||||
pub mod responses;
|
||||
pub mod typedefs;
|
@ -8,25 +8,15 @@ use embassy_futures::poll_once;
|
||||
use embassy_stm32::ipcc::Ipcc;
|
||||
use embassy_sync::waitqueue::AtomicWaker;
|
||||
|
||||
use self::commands::MacCommand;
|
||||
use self::event::MacEvent;
|
||||
use self::typedefs::MacError;
|
||||
use crate::cmd::CmdPacket;
|
||||
use crate::consts::TlPacketType;
|
||||
use crate::evt::{EvtBox, EvtPacket};
|
||||
use crate::mac::commands::MacCommand;
|
||||
use crate::mac::event::MacEvent;
|
||||
use crate::mac::typedefs::MacError;
|
||||
use crate::tables::{MAC_802_15_4_CMD_BUFFER, MAC_802_15_4_NOTIF_RSP_EVT_BUFFER};
|
||||
use crate::{channels, evt};
|
||||
|
||||
pub mod commands;
|
||||
mod consts;
|
||||
pub mod event;
|
||||
mod helpers;
|
||||
pub mod indications;
|
||||
mod macros;
|
||||
mod opcodes;
|
||||
pub mod responses;
|
||||
pub mod typedefs;
|
||||
|
||||
static MAC_WAKER: AtomicWaker = AtomicWaker::new();
|
||||
static MAC_EVT_OUT: AtomicBool = AtomicBool::new(false);
|
||||
|
Reference in New Issue
Block a user