rework wifi controller share

This commit is contained in:
2025-09-16 02:24:03 +02:00
parent 1397f5d775
commit 1c84cd00da
3 changed files with 89 additions and 47 deletions

View File

@@ -21,6 +21,7 @@ use crate::{
};
use alloc::boxed::Box;
use alloc::format;
use alloc::sync::Arc;
use anyhow::{Ok, Result};
use async_trait::async_trait;
use embassy_executor::Spawner;
@@ -273,10 +274,15 @@ impl PlantHal {
};
let ota_next = mk_static!(PartitionEntry, ota_partition);
let storage_ota_next = mk_static!(FlashStorage, FlashStorage::new());
let ota_next = mk_static!(
FlashRegion<FlashStorage>,
ota_next.as_embedded_storage(storage_ota_next)
);
let mut esp = Esp {
rng,
controller: Some(controller),
controller: Arc::new(Mutex::new(controller)),
interfaces: Some(interfaces),
boot_button,
mqtt_client: None,