diff options
| author | xoviat <[email protected]> | 2023-06-18 10:11:36 -0500 |
|---|---|---|
| committer | xoviat <[email protected]> | 2023-06-18 10:11:36 -0500 |
| commit | 9f63158aad81486b4bd0ffe6f8d7103458ba360f (patch) | |
| tree | 0991b5765a5f16efed7e1cf3954f295a651a9377 | |
| parent | 748d1ea89da160df927ea3dd597704ba236e0fb6 (diff) | |
stm32/wpan: reorg modules
| -rw-r--r-- | embassy-stm32-wpan/src/consts.rs | 34 | ||||
| -rw-r--r-- | embassy-stm32-wpan/src/lib.rs | 97 | ||||
| -rw-r--r-- | embassy-stm32-wpan/src/mm.rs | 13 | ||||
| -rw-r--r-- | embassy-stm32-wpan/src/shci.rs | 2 | ||||
| -rw-r--r-- | embassy-stm32-wpan/src/tables.rs | 77 |
5 files changed, 120 insertions, 103 deletions
diff --git a/embassy-stm32-wpan/src/consts.rs b/embassy-stm32-wpan/src/consts.rs index caf26c06b..9a107306c 100644 --- a/embassy-stm32-wpan/src/consts.rs +++ b/embassy-stm32-wpan/src/consts.rs | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | use core::convert::TryFrom; | 1 | use core::convert::TryFrom; |
| 2 | 2 | ||
| 3 | use crate::evt::CsEvt; | ||
| 4 | use crate::PacketHeader; | ||
| 5 | |||
| 3 | #[derive(Debug)] | 6 | #[derive(Debug)] |
| 4 | #[repr(C)] | 7 | #[repr(C)] |
| 5 | pub enum TlPacketType { | 8 | pub enum TlPacketType { |
| @@ -53,3 +56,34 @@ impl TryFrom<u8> for TlPacketType { | |||
| 53 | } | 56 | } |
| 54 | } | 57 | } |
| 55 | } | 58 | } |
| 59 | |||
| 60 | pub const TL_PACKET_HEADER_SIZE: usize = core::mem::size_of::<PacketHeader>(); | ||
| 61 | pub const TL_EVT_HEADER_SIZE: usize = 3; | ||
| 62 | pub const TL_CS_EVT_SIZE: usize = core::mem::size_of::<CsEvt>(); | ||
| 63 | |||
| 64 | /** | ||
| 65 | * Queue length of BLE Event | ||
| 66 | * This parameter defines the number of asynchronous events that can be stored in the HCI layer before | ||
| 67 | * being reported to the application. When a command is sent to the BLE core coprocessor, the HCI layer | ||
| 68 | * is waiting for the event with the Num_HCI_Command_Packets set to 1. The receive queue shall be large | ||
| 69 | * enough to store all asynchronous events received in between. | ||
| 70 | * When CFG_TLBLE_MOST_EVENT_PAYLOAD_SIZE is set to 27, this allow to store three 255 bytes long asynchronous events | ||
| 71 | * between the HCI command and its event. | ||
| 72 | * This parameter depends on the value given to CFG_TLBLE_MOST_EVENT_PAYLOAD_SIZE. When the queue size is to small, | ||
| 73 | * the system may hang if the queue is full with asynchronous events and the HCI layer is still waiting | ||
| 74 | * for a CC/CS event, In that case, the notification TL_BLE_HCI_ToNot() is called to indicate | ||
| 75 | * to the application a HCI command did not receive its command event within 30s (Default HCI Timeout). | ||
| 76 | */ | ||
| 77 | pub const CFG_TL_BLE_EVT_QUEUE_LENGTH: usize = 5; | ||
| 78 | pub const CFG_TL_BLE_MOST_EVENT_PAYLOAD_SIZE: usize = 255; | ||
| 79 | pub const TL_BLE_EVENT_FRAME_SIZE: usize = TL_EVT_HEADER_SIZE + CFG_TL_BLE_MOST_EVENT_PAYLOAD_SIZE; | ||
| 80 | |||
| 81 | pub const POOL_SIZE: usize = CFG_TL_BLE_EVT_QUEUE_LENGTH * 4 * divc(TL_PACKET_HEADER_SIZE + TL_BLE_EVENT_FRAME_SIZE, 4); | ||
| 82 | |||
| 83 | pub const fn divc(x: usize, y: usize) -> usize { | ||
| 84 | (x + y - 1) / y | ||
| 85 | } | ||
| 86 | |||
| 87 | pub const TL_BLE_EVT_CS_PACKET_SIZE: usize = TL_EVT_HEADER_SIZE + TL_CS_EVT_SIZE; | ||
| 88 | #[allow(dead_code)] | ||
| 89 | pub const TL_BLE_EVT_CS_BUFFER_SIZE: usize = TL_PACKET_HEADER_SIZE + TL_BLE_EVT_CS_PACKET_SIZE; | ||
diff --git a/embassy-stm32-wpan/src/lib.rs b/embassy-stm32-wpan/src/lib.rs index 035b130c8..1ddb3f2e0 100644 --- a/embassy-stm32-wpan/src/lib.rs +++ b/embassy-stm32-wpan/src/lib.rs | |||
| @@ -7,16 +7,13 @@ use core::mem::MaybeUninit; | |||
| 7 | use core::sync::atomic::{compiler_fence, Ordering}; | 7 | use core::sync::atomic::{compiler_fence, Ordering}; |
| 8 | 8 | ||
| 9 | use ble::Ble; | 9 | use ble::Ble; |
| 10 | use cmd::CmdPacket; | ||
| 11 | use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; | 10 | use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; |
| 12 | use embassy_stm32::interrupt; | 11 | use embassy_stm32::interrupt; |
| 13 | use embassy_stm32::ipcc::{Config, Ipcc, ReceiveInterruptHandler, TransmitInterruptHandler}; | 12 | use embassy_stm32::ipcc::{Config, Ipcc, ReceiveInterruptHandler, TransmitInterruptHandler}; |
| 14 | use embassy_stm32::peripherals::IPCC; | 13 | use embassy_stm32::peripherals::IPCC; |
| 15 | use mm::MemoryManager; | 14 | use mm::MemoryManager; |
| 16 | use sys::Sys; | 15 | use sys::Sys; |
| 17 | use tables::{ | 16 | use tables::*; |
| 18 | BleTable, DeviceInfoTable, Mac802_15_4Table, MemManagerTable, RefTable, SysTable, ThreadTable, TracesTable, | ||
| 19 | }; | ||
| 20 | use unsafe_linked_list::LinkedListNode; | 17 | use unsafe_linked_list::LinkedListNode; |
| 21 | 18 | ||
| 22 | pub mod ble; | 19 | pub mod ble; |
| @@ -30,100 +27,8 @@ pub mod sys; | |||
| 30 | pub mod tables; | 27 | pub mod tables; |
| 31 | pub mod unsafe_linked_list; | 28 | pub mod unsafe_linked_list; |
| 32 | 29 | ||
| 33 | #[link_section = "TL_REF_TABLE"] | ||
| 34 | pub static mut TL_REF_TABLE: MaybeUninit<RefTable> = MaybeUninit::uninit(); | ||
| 35 | |||
| 36 | #[link_section = "MB_MEM1"] | ||
| 37 | static mut TL_DEVICE_INFO_TABLE: MaybeUninit<DeviceInfoTable> = MaybeUninit::uninit(); | ||
| 38 | |||
| 39 | #[link_section = "MB_MEM1"] | ||
| 40 | static mut TL_BLE_TABLE: MaybeUninit<BleTable> = MaybeUninit::uninit(); | ||
| 41 | |||
| 42 | #[link_section = "MB_MEM1"] | ||
| 43 | static mut TL_THREAD_TABLE: MaybeUninit<ThreadTable> = MaybeUninit::uninit(); | ||
| 44 | |||
| 45 | #[link_section = "MB_MEM1"] | ||
| 46 | static mut TL_SYS_TABLE: MaybeUninit<SysTable> = MaybeUninit::uninit(); | ||
| 47 | |||
| 48 | #[link_section = "MB_MEM1"] | ||
| 49 | static mut TL_MEM_MANAGER_TABLE: MaybeUninit<MemManagerTable> = MaybeUninit::uninit(); | ||
| 50 | |||
| 51 | #[link_section = "MB_MEM1"] | ||
| 52 | static mut TL_TRACES_TABLE: MaybeUninit<TracesTable> = MaybeUninit::uninit(); | ||
| 53 | |||
| 54 | #[link_section = "MB_MEM1"] | ||
| 55 | static mut TL_MAC_802_15_4_TABLE: MaybeUninit<Mac802_15_4Table> = MaybeUninit::uninit(); | ||
| 56 | |||
| 57 | #[link_section = "MB_MEM2"] | ||
| 58 | static mut FREE_BUF_QUEUE: MaybeUninit<LinkedListNode> = MaybeUninit::uninit(); | ||
| 59 | |||
| 60 | // Not in shared RAM | ||
| 61 | static mut LOCAL_FREE_BUF_QUEUE: MaybeUninit<LinkedListNode> = MaybeUninit::uninit(); | ||
| 62 | |||
| 63 | #[allow(dead_code)] // Not used currently but reserved | ||
| 64 | #[link_section = "MB_MEM2"] | ||
| 65 | static mut TRACES_EVT_QUEUE: MaybeUninit<LinkedListNode> = MaybeUninit::uninit(); | ||
| 66 | |||
| 67 | type PacketHeader = LinkedListNode; | 30 | type PacketHeader = LinkedListNode; |
| 68 | 31 | ||
| 69 | const TL_PACKET_HEADER_SIZE: usize = core::mem::size_of::<PacketHeader>(); | ||
| 70 | const TL_EVT_HEADER_SIZE: usize = 3; | ||
| 71 | const TL_CS_EVT_SIZE: usize = core::mem::size_of::<evt::CsEvt>(); | ||
| 72 | |||
| 73 | #[link_section = "MB_MEM2"] | ||
| 74 | static mut CS_BUFFER: MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + TL_EVT_HEADER_SIZE + TL_CS_EVT_SIZE]> = | ||
| 75 | MaybeUninit::uninit(); | ||
| 76 | |||
| 77 | #[link_section = "MB_MEM2"] | ||
| 78 | static mut EVT_QUEUE: MaybeUninit<LinkedListNode> = MaybeUninit::uninit(); | ||
| 79 | |||
| 80 | #[link_section = "MB_MEM2"] | ||
| 81 | static mut SYSTEM_EVT_QUEUE: MaybeUninit<LinkedListNode> = MaybeUninit::uninit(); | ||
| 82 | |||
| 83 | #[link_section = "MB_MEM2"] | ||
| 84 | pub static mut SYS_CMD_BUF: MaybeUninit<CmdPacket> = MaybeUninit::uninit(); | ||
| 85 | |||
| 86 | /** | ||
| 87 | * Queue length of BLE Event | ||
| 88 | * This parameter defines the number of asynchronous events that can be stored in the HCI layer before | ||
| 89 | * being reported to the application. When a command is sent to the BLE core coprocessor, the HCI layer | ||
| 90 | * is waiting for the event with the Num_HCI_Command_Packets set to 1. The receive queue shall be large | ||
| 91 | * enough to store all asynchronous events received in between. | ||
| 92 | * When CFG_TLBLE_MOST_EVENT_PAYLOAD_SIZE is set to 27, this allow to store three 255 bytes long asynchronous events | ||
| 93 | * between the HCI command and its event. | ||
| 94 | * This parameter depends on the value given to CFG_TLBLE_MOST_EVENT_PAYLOAD_SIZE. When the queue size is to small, | ||
| 95 | * the system may hang if the queue is full with asynchronous events and the HCI layer is still waiting | ||
| 96 | * for a CC/CS event, In that case, the notification TL_BLE_HCI_ToNot() is called to indicate | ||
| 97 | * to the application a HCI command did not receive its command event within 30s (Default HCI Timeout). | ||
| 98 | */ | ||
| 99 | const CFG_TLBLE_EVT_QUEUE_LENGTH: usize = 5; | ||
| 100 | const CFG_TLBLE_MOST_EVENT_PAYLOAD_SIZE: usize = 255; | ||
| 101 | const TL_BLE_EVENT_FRAME_SIZE: usize = TL_EVT_HEADER_SIZE + CFG_TLBLE_MOST_EVENT_PAYLOAD_SIZE; | ||
| 102 | |||
| 103 | const fn divc(x: usize, y: usize) -> usize { | ||
| 104 | ((x) + (y) - 1) / (y) | ||
| 105 | } | ||
| 106 | |||
| 107 | const POOL_SIZE: usize = CFG_TLBLE_EVT_QUEUE_LENGTH * 4 * divc(TL_PACKET_HEADER_SIZE + TL_BLE_EVENT_FRAME_SIZE, 4); | ||
| 108 | |||
| 109 | #[link_section = "MB_MEM2"] | ||
| 110 | static mut EVT_POOL: MaybeUninit<[u8; POOL_SIZE]> = MaybeUninit::uninit(); | ||
| 111 | |||
| 112 | #[link_section = "MB_MEM2"] | ||
| 113 | static mut SYS_SPARE_EVT_BUF: MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + TL_EVT_HEADER_SIZE + 255]> = | ||
| 114 | MaybeUninit::uninit(); | ||
| 115 | |||
| 116 | #[link_section = "MB_MEM2"] | ||
| 117 | static mut BLE_SPARE_EVT_BUF: MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + TL_EVT_HEADER_SIZE + 255]> = | ||
| 118 | MaybeUninit::uninit(); | ||
| 119 | |||
| 120 | #[link_section = "MB_MEM2"] | ||
| 121 | static mut BLE_CMD_BUFFER: MaybeUninit<CmdPacket> = MaybeUninit::uninit(); | ||
| 122 | |||
| 123 | #[link_section = "MB_MEM2"] | ||
| 124 | // fuck these "magic" numbers from ST ---v---v | ||
| 125 | static mut HCI_ACL_DATA_BUFFER: MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + 5 + 251]> = MaybeUninit::uninit(); | ||
| 126 | |||
| 127 | pub struct TlMbox<'d> { | 32 | pub struct TlMbox<'d> { |
| 128 | _ipcc: PeripheralRef<'d, IPCC>, | 33 | _ipcc: PeripheralRef<'d, IPCC>, |
| 129 | 34 | ||
diff --git a/embassy-stm32-wpan/src/mm.rs b/embassy-stm32-wpan/src/mm.rs index 21f42409a..dc499c1e7 100644 --- a/embassy-stm32-wpan/src/mm.rs +++ b/embassy-stm32-wpan/src/mm.rs | |||
| @@ -1,22 +1,23 @@ | |||
| 1 | //! Memory manager routines | 1 | //! Memory manager routines |
| 2 | |||
| 3 | use core::future::poll_fn; | 2 | use core::future::poll_fn; |
| 4 | use core::marker::PhantomData; | 3 | use core::marker::PhantomData; |
| 4 | use core::mem::MaybeUninit; | ||
| 5 | use core::task::Poll; | 5 | use core::task::Poll; |
| 6 | 6 | ||
| 7 | use cortex_m::interrupt; | 7 | use cortex_m::interrupt; |
| 8 | use embassy_stm32::ipcc::Ipcc; | 8 | use embassy_stm32::ipcc::Ipcc; |
| 9 | use embassy_sync::waitqueue::AtomicWaker; | 9 | use embassy_sync::waitqueue::AtomicWaker; |
| 10 | 10 | ||
| 11 | use crate::channels; | ||
| 12 | use crate::consts::POOL_SIZE; | ||
| 11 | use crate::evt::EvtPacket; | 13 | use crate::evt::EvtPacket; |
| 12 | use crate::tables::MemManagerTable; | 14 | use crate::tables::{ |
| 13 | use crate::unsafe_linked_list::LinkedListNode; | 15 | MemManagerTable, BLE_SPARE_EVT_BUF, EVT_POOL, FREE_BUF_QUEUE, SYS_SPARE_EVT_BUF, TL_MEM_MANAGER_TABLE, |
| 14 | use crate::{ | ||
| 15 | channels, BLE_SPARE_EVT_BUF, EVT_POOL, FREE_BUF_QUEUE, LOCAL_FREE_BUF_QUEUE, POOL_SIZE, SYS_SPARE_EVT_BUF, | ||
| 16 | TL_MEM_MANAGER_TABLE, | ||
| 17 | }; | 16 | }; |
| 17 | use crate::unsafe_linked_list::LinkedListNode; | ||
| 18 | 18 | ||
| 19 | static MM_WAKER: AtomicWaker = AtomicWaker::new(); | 19 | static MM_WAKER: AtomicWaker = AtomicWaker::new(); |
| 20 | static mut LOCAL_FREE_BUF_QUEUE: MaybeUninit<LinkedListNode> = MaybeUninit::uninit(); | ||
| 20 | 21 | ||
| 21 | pub struct MemoryManager { | 22 | pub struct MemoryManager { |
| 22 | phantom: PhantomData<MemoryManager>, | 23 | phantom: PhantomData<MemoryManager>, |
diff --git a/embassy-stm32-wpan/src/shci.rs b/embassy-stm32-wpan/src/shci.rs index f4e9ba84c..b60158b1b 100644 --- a/embassy-stm32-wpan/src/shci.rs +++ b/embassy-stm32-wpan/src/shci.rs | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | use core::{mem, slice}; | 1 | use core::{mem, slice}; |
| 2 | 2 | ||
| 3 | use super::{TL_CS_EVT_SIZE, TL_EVT_HEADER_SIZE, TL_PACKET_HEADER_SIZE}; | 3 | use crate::consts::{TL_CS_EVT_SIZE, TL_EVT_HEADER_SIZE, TL_PACKET_HEADER_SIZE}; |
| 4 | 4 | ||
| 5 | const SHCI_OGF: u16 = 0x3F; | 5 | const SHCI_OGF: u16 = 0x3F; |
| 6 | 6 | ||
diff --git a/embassy-stm32-wpan/src/tables.rs b/embassy-stm32-wpan/src/tables.rs index 151216958..81873b147 100644 --- a/embassy-stm32-wpan/src/tables.rs +++ b/embassy-stm32-wpan/src/tables.rs | |||
| @@ -1,6 +1,9 @@ | |||
| 1 | use core::mem::MaybeUninit; | ||
| 2 | |||
| 1 | use bit_field::BitField; | 3 | use bit_field::BitField; |
| 2 | 4 | ||
| 3 | use crate::cmd::{AclDataPacket, CmdPacket}; | 5 | use crate::cmd::{AclDataPacket, CmdPacket}; |
| 6 | use crate::consts::{POOL_SIZE, TL_CS_EVT_SIZE, TL_EVT_HEADER_SIZE, TL_PACKET_HEADER_SIZE}; | ||
| 4 | use crate::unsafe_linked_list::LinkedListNode; | 7 | use crate::unsafe_linked_list::LinkedListNode; |
| 5 | 8 | ||
| 6 | #[derive(Debug, Copy, Clone)] | 9 | #[derive(Debug, Copy, Clone)] |
| @@ -173,3 +176,77 @@ pub struct RefTable { | |||
| 173 | pub traces_table: *const TracesTable, | 176 | pub traces_table: *const TracesTable, |
| 174 | pub mac_802_15_4_table: *const Mac802_15_4Table, | 177 | pub mac_802_15_4_table: *const Mac802_15_4Table, |
| 175 | } | 178 | } |
| 179 | |||
| 180 | // --------------------- ref table --------------------- | ||
| 181 | #[link_section = "TL_REF_TABLE"] | ||
| 182 | pub static mut TL_REF_TABLE: MaybeUninit<RefTable> = MaybeUninit::uninit(); | ||
| 183 | |||
| 184 | #[link_section = "MB_MEM1"] | ||
| 185 | pub static mut TL_DEVICE_INFO_TABLE: MaybeUninit<DeviceInfoTable> = MaybeUninit::uninit(); | ||
| 186 | |||
| 187 | #[link_section = "MB_MEM1"] | ||
| 188 | pub static mut TL_BLE_TABLE: MaybeUninit<BleTable> = MaybeUninit::uninit(); | ||
| 189 | |||
| 190 | #[link_section = "MB_MEM1"] | ||
| 191 | pub static mut TL_THREAD_TABLE: MaybeUninit<ThreadTable> = MaybeUninit::uninit(); | ||
| 192 | |||
| 193 | // #[link_section = "MB_MEM1"] | ||
| 194 | // pub static mut TL_LLD_TESTS_TABLE: MaybeUninit<LldTestTable> = MaybeUninit::uninit(); | ||
| 195 | |||
| 196 | // #[link_section = "MB_MEM1"] | ||
| 197 | // pub static mut TL_BLE_LLD_TABLE: MaybeUninit<BleLldTable> = MaybeUninit::uninit(); | ||
| 198 | |||
| 199 | #[link_section = "MB_MEM1"] | ||
| 200 | pub static mut TL_SYS_TABLE: MaybeUninit<SysTable> = MaybeUninit::uninit(); | ||
| 201 | |||
| 202 | #[link_section = "MB_MEM1"] | ||
| 203 | pub static mut TL_MEM_MANAGER_TABLE: MaybeUninit<MemManagerTable> = MaybeUninit::uninit(); | ||
| 204 | |||
| 205 | #[link_section = "MB_MEM1"] | ||
| 206 | pub static mut TL_TRACES_TABLE: MaybeUninit<TracesTable> = MaybeUninit::uninit(); | ||
| 207 | |||
| 208 | #[link_section = "MB_MEM1"] | ||
| 209 | pub static mut TL_MAC_802_15_4_TABLE: MaybeUninit<Mac802_15_4Table> = MaybeUninit::uninit(); | ||
| 210 | |||
| 211 | // #[link_section = "MB_MEM1"] | ||
| 212 | // pub static mut TL_ZIGBEE_TABLE: MaybeUninit<ZigbeeTable> = MaybeUninit::uninit(); | ||
| 213 | |||
| 214 | // --------------------- tables --------------------- | ||
| 215 | #[link_section = "MB_MEM1"] | ||
| 216 | pub static mut FREE_BUF_QUEUE: MaybeUninit<LinkedListNode> = MaybeUninit::uninit(); | ||
| 217 | |||
| 218 | #[allow(dead_code)] | ||
| 219 | #[link_section = "MB_MEM1"] | ||
| 220 | pub static mut TRACES_EVT_QUEUE: MaybeUninit<LinkedListNode> = MaybeUninit::uninit(); | ||
| 221 | |||
| 222 | #[link_section = "MB_MEM2"] | ||
| 223 | pub static mut CS_BUFFER: MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + TL_EVT_HEADER_SIZE + TL_CS_EVT_SIZE]> = | ||
| 224 | MaybeUninit::uninit(); | ||
| 225 | |||
| 226 | #[link_section = "MB_MEM2"] | ||
| 227 | pub static mut EVT_QUEUE: MaybeUninit<LinkedListNode> = MaybeUninit::uninit(); | ||
| 228 | |||
| 229 | #[link_section = "MB_MEM2"] | ||
| 230 | pub static mut SYSTEM_EVT_QUEUE: MaybeUninit<LinkedListNode> = MaybeUninit::uninit(); | ||
| 231 | |||
| 232 | // --------------------- app tables --------------------- | ||
| 233 | #[link_section = "MB_MEM2"] | ||
| 234 | pub static mut EVT_POOL: MaybeUninit<[u8; POOL_SIZE]> = MaybeUninit::uninit(); | ||
| 235 | |||
| 236 | #[link_section = "MB_MEM2"] | ||
| 237 | pub static mut SYS_CMD_BUF: MaybeUninit<CmdPacket> = MaybeUninit::uninit(); | ||
| 238 | |||
| 239 | #[link_section = "MB_MEM2"] | ||
| 240 | pub static mut SYS_SPARE_EVT_BUF: MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + TL_EVT_HEADER_SIZE + 255]> = | ||
| 241 | MaybeUninit::uninit(); | ||
| 242 | |||
| 243 | #[link_section = "MB_MEM1"] | ||
| 244 | pub static mut BLE_CMD_BUFFER: MaybeUninit<CmdPacket> = MaybeUninit::uninit(); | ||
| 245 | |||
| 246 | #[link_section = "MB_MEM2"] | ||
| 247 | pub static mut BLE_SPARE_EVT_BUF: MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + TL_EVT_HEADER_SIZE + 255]> = | ||
| 248 | MaybeUninit::uninit(); | ||
| 249 | |||
| 250 | #[link_section = "MB_MEM2"] | ||
| 251 | // fuck these "magic" numbers from ST ---v---v | ||
| 252 | pub static mut HCI_ACL_DATA_BUFFER: MaybeUninit<[u8; TL_PACKET_HEADER_SIZE + 5 + 251]> = MaybeUninit::uninit(); | ||
