mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 08:12:30 +00:00
wpan: factor mac logic into other mod
This commit is contained in:
parent
3705b4f40d
commit
4db4200c37
@ -26,6 +26,9 @@ pub mod sub;
|
|||||||
pub mod tables;
|
pub mod tables;
|
||||||
pub mod unsafe_linked_list;
|
pub mod unsafe_linked_list;
|
||||||
|
|
||||||
|
#[cfg(feature = "mac")]
|
||||||
|
pub mod mac;
|
||||||
|
|
||||||
#[cfg(feature = "ble")]
|
#[cfg(feature = "ble")]
|
||||||
pub use crate::sub::ble::hci;
|
pub use crate::sub::ble::hci;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ use super::responses::{
|
|||||||
AssociateConfirm, CalibrateConfirm, DataConfirm, DisassociateConfirm, DpsConfirm, GetConfirm, GtsConfirm,
|
AssociateConfirm, CalibrateConfirm, DataConfirm, DisassociateConfirm, DpsConfirm, GetConfirm, GtsConfirm,
|
||||||
PollConfirm, PurgeConfirm, ResetConfirm, RxEnableConfirm, ScanConfirm, SetConfirm, SoundingConfirm, StartConfirm,
|
PollConfirm, PurgeConfirm, ResetConfirm, RxEnableConfirm, ScanConfirm, SetConfirm, SoundingConfirm, StartConfirm,
|
||||||
};
|
};
|
||||||
use crate::sub::mac::opcodes::OpcodeM0ToM4;
|
use crate::mac::opcodes::OpcodeM0ToM4;
|
||||||
|
|
||||||
pub trait ParseableMacEvent {
|
pub trait ParseableMacEvent {
|
||||||
const SIZE: usize;
|
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_stm32::ipcc::Ipcc;
|
||||||
use embassy_sync::waitqueue::AtomicWaker;
|
use embassy_sync::waitqueue::AtomicWaker;
|
||||||
|
|
||||||
use self::commands::MacCommand;
|
|
||||||
use self::event::MacEvent;
|
|
||||||
use self::typedefs::MacError;
|
|
||||||
use crate::cmd::CmdPacket;
|
use crate::cmd::CmdPacket;
|
||||||
use crate::consts::TlPacketType;
|
use crate::consts::TlPacketType;
|
||||||
use crate::evt::{EvtBox, EvtPacket};
|
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::tables::{MAC_802_15_4_CMD_BUFFER, MAC_802_15_4_NOTIF_RSP_EVT_BUFFER};
|
||||||
use crate::{channels, evt};
|
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_WAKER: AtomicWaker = AtomicWaker::new();
|
||||||
static MAC_EVT_OUT: AtomicBool = AtomicBool::new(false);
|
static MAC_EVT_OUT: AtomicBool = AtomicBool::new(false);
|
||||||
|
|
@ -6,9 +6,9 @@ use defmt::*;
|
|||||||
use embassy_executor::Spawner;
|
use embassy_executor::Spawner;
|
||||||
use embassy_stm32::bind_interrupts;
|
use embassy_stm32::bind_interrupts;
|
||||||
use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler};
|
use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler};
|
||||||
use embassy_stm32_wpan::sub::mac::commands::{AssociateResponse, ResetRequest, SetRequest, StartRequest};
|
use embassy_stm32_wpan::mac::commands::{AssociateResponse, ResetRequest, SetRequest, StartRequest};
|
||||||
use embassy_stm32_wpan::sub::mac::event::MacEvent;
|
use embassy_stm32_wpan::mac::event::MacEvent;
|
||||||
use embassy_stm32_wpan::sub::mac::typedefs::{MacChannel, MacStatus, PanId, PibId, SecurityLevel};
|
use embassy_stm32_wpan::mac::typedefs::{MacChannel, MacStatus, PanId, PibId, SecurityLevel};
|
||||||
use embassy_stm32_wpan::sub::mm;
|
use embassy_stm32_wpan::sub::mm;
|
||||||
use embassy_stm32_wpan::TlMbox;
|
use embassy_stm32_wpan::TlMbox;
|
||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
@ -6,9 +6,9 @@ use defmt::*;
|
|||||||
use embassy_executor::Spawner;
|
use embassy_executor::Spawner;
|
||||||
use embassy_stm32::bind_interrupts;
|
use embassy_stm32::bind_interrupts;
|
||||||
use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler};
|
use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler};
|
||||||
use embassy_stm32_wpan::sub::mac::commands::{AssociateRequest, DataRequest, GetRequest, ResetRequest, SetRequest};
|
use embassy_stm32_wpan::mac::commands::{AssociateRequest, DataRequest, GetRequest, ResetRequest, SetRequest};
|
||||||
use embassy_stm32_wpan::sub::mac::event::MacEvent;
|
use embassy_stm32_wpan::mac::event::MacEvent;
|
||||||
use embassy_stm32_wpan::sub::mac::typedefs::{
|
use embassy_stm32_wpan::mac::typedefs::{
|
||||||
AddressMode, Capabilities, KeyIdMode, MacAddress, MacChannel, PanId, PibId, SecurityLevel,
|
AddressMode, Capabilities, KeyIdMode, MacAddress, MacChannel, PanId, PibId, SecurityLevel,
|
||||||
};
|
};
|
||||||
use embassy_stm32_wpan::sub::mm;
|
use embassy_stm32_wpan::sub::mm;
|
||||||
|
@ -10,9 +10,9 @@ use common::*;
|
|||||||
use embassy_executor::Spawner;
|
use embassy_executor::Spawner;
|
||||||
use embassy_stm32::bind_interrupts;
|
use embassy_stm32::bind_interrupts;
|
||||||
use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler};
|
use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler};
|
||||||
use embassy_stm32_wpan::sub::mac::commands::{AssociateRequest, GetRequest, ResetRequest, SetRequest};
|
use embassy_stm32_wpan::mac::commands::{AssociateRequest, GetRequest, ResetRequest, SetRequest};
|
||||||
use embassy_stm32_wpan::sub::mac::event::MacEvent;
|
use embassy_stm32_wpan::mac::event::MacEvent;
|
||||||
use embassy_stm32_wpan::sub::mac::typedefs::{
|
use embassy_stm32_wpan::mac::typedefs::{
|
||||||
AddressMode, Capabilities, KeyIdMode, MacAddress, MacChannel, PanId, PibId, SecurityLevel,
|
AddressMode, Capabilities, KeyIdMode, MacAddress, MacChannel, PanId, PibId, SecurityLevel,
|
||||||
};
|
};
|
||||||
use embassy_stm32_wpan::sub::mm;
|
use embassy_stm32_wpan::sub::mm;
|
||||||
|
Loading…
Reference in New Issue
Block a user