diff --git a/rust/src/network.rs b/rust/src/network.rs index dfe545e..4c459cc 100644 --- a/rust/src/network.rs +++ b/rust/src/network.rs @@ -3,6 +3,7 @@ use crate::config::NetworkConfig; use crate::fat_error::{ContextExt, FatError, FatResult}; use crate::hal::{PlantHal, HAL}; use crate::mqtt; +use crate::util::mk_static; use alloc::string::{String, ToString}; use alloc::sync::Arc; use chrono::{DateTime, Utc}; @@ -196,15 +197,6 @@ pub(crate) async fn run_dhcp(stack: Stack<'static>, ip: Ipv4Addr) { } } -macro_rules! mk_static { - ($t:ty,$val:expr) => {{ - static STATIC_CELL: static_cell::StaticCell<$t> = static_cell::StaticCell::new(); - #[deny(unused_attributes)] - let x = STATIC_CELL.uninit().write(($val)); - x - }}; -} - pub async fn wifi_ap( ssid: String, interface_ap: Interface<'static>,