From 72ee12ec7a1c1da34be1d6f3dc2f8b0b255041d0 Mon Sep 17 00:00:00 2001 From: ju6ge Date: Sun, 10 May 2026 13:54:07 +0200 Subject: [PATCH] refactor: use crate::util::mk_static in hal module --- rust/src/hal/mod.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/rust/src/hal/mod.rs b/rust/src/hal/mod.rs index 9a03799..27980eb 100644 --- a/rust/src/hal/mod.rs +++ b/rust/src/hal/mod.rs @@ -282,14 +282,7 @@ pub struct FreePeripherals<'a> { pub adc1: ADC1<'a>, } -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 - }}; -} +use crate::util::mk_static; impl PlantHal { pub async fn create() -> Result>, FatError> {