Merge pull request #1656 from xoviat/mac-4

wpan: factor mac logic into other mod
This commit is contained in:
xoviat 2023-07-15 19:49:16 +00:00 committed by GitHub
commit cf278ea1b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 25 additions and 23 deletions

View file

@ -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;

View file

@ -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;

View 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;

View file

@ -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);

View file

@ -6,9 +6,9 @@ use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::bind_interrupts;
use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler};
use embassy_stm32_wpan::sub::mac::commands::{AssociateResponse, ResetRequest, SetRequest, StartRequest};
use embassy_stm32_wpan::sub::mac::event::MacEvent;
use embassy_stm32_wpan::sub::mac::typedefs::{MacChannel, MacStatus, PanId, PibId, SecurityLevel};
use embassy_stm32_wpan::mac::commands::{AssociateResponse, ResetRequest, SetRequest, StartRequest};
use embassy_stm32_wpan::mac::event::MacEvent;
use embassy_stm32_wpan::mac::typedefs::{MacChannel, MacStatus, PanId, PibId, SecurityLevel};
use embassy_stm32_wpan::sub::mm;
use embassy_stm32_wpan::TlMbox;
use {defmt_rtt as _, panic_probe as _};

View file

@ -6,9 +6,9 @@ use defmt::*;
use embassy_executor::Spawner;
use embassy_stm32::bind_interrupts;
use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler};
use embassy_stm32_wpan::sub::mac::commands::{AssociateRequest, DataRequest, GetRequest, ResetRequest, SetRequest};
use embassy_stm32_wpan::sub::mac::event::MacEvent;
use embassy_stm32_wpan::sub::mac::typedefs::{
use embassy_stm32_wpan::mac::commands::{AssociateRequest, DataRequest, GetRequest, ResetRequest, SetRequest};
use embassy_stm32_wpan::mac::event::MacEvent;
use embassy_stm32_wpan::mac::typedefs::{
AddressMode, Capabilities, KeyIdMode, MacAddress, MacChannel, PanId, PibId, SecurityLevel,
};
use embassy_stm32_wpan::sub::mm;

View file

@ -10,9 +10,9 @@ use common::*;
use embassy_executor::Spawner;
use embassy_stm32::bind_interrupts;
use embassy_stm32::ipcc::{Config, ReceiveInterruptHandler, TransmitInterruptHandler};
use embassy_stm32_wpan::sub::mac::commands::{AssociateRequest, GetRequest, ResetRequest, SetRequest};
use embassy_stm32_wpan::sub::mac::event::MacEvent;
use embassy_stm32_wpan::sub::mac::typedefs::{
use embassy_stm32_wpan::mac::commands::{AssociateRequest, GetRequest, ResetRequest, SetRequest};
use embassy_stm32_wpan::mac::event::MacEvent;
use embassy_stm32_wpan::mac::typedefs::{
AddressMode, Capabilities, KeyIdMode, MacAddress, MacChannel, PanId, PibId, SecurityLevel,
};
use embassy_stm32_wpan::sub::mm;