From f554eceb005c0fdd2bd683dffdb85bd35a3acd04 Mon Sep 17 00:00:00 2001 From: liebman Date: Sun, 28 Apr 2024 10:53:49 -0700 Subject: [PATCH] update to compile with latest esp-hal git main --- esp-wifi/src/common_adapter/mod.rs | 6 +++--- esp-wifi/src/lib.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/esp-wifi/src/common_adapter/mod.rs b/esp-wifi/src/common_adapter/mod.rs index 63bb3747..1ab07f1c 100644 --- a/esp-wifi/src/common_adapter/mod.rs +++ b/esp-wifi/src/common_adapter/mod.rs @@ -12,8 +12,8 @@ use crate::compat::timer_compat::*; use crate::hal; use esp_wifi_sys::include::timespec; +use hal::peripherals::RADIO_CLK; use hal::rng::Rng; -use hal::system::RadioClockControl; use hal::macros::ram; @@ -37,13 +37,13 @@ pub(crate) mod phy_init_data; pub(crate) static mut RANDOM_GENERATOR: Option = None; -pub(crate) static mut RADIO_CLOCKS: Option = None; +pub(crate) static mut RADIO_CLOCKS: Option = None; pub(crate) fn init_rng(rng: Rng) { unsafe { RANDOM_GENERATOR = Some(core::mem::transmute(rng)) }; } -pub(crate) fn init_radio_clock_control(rcc: RadioClockControl) { +pub(crate) fn init_radio_clock_control(rcc: RADIO_CLK) { unsafe { RADIO_CLOCKS = Some(core::mem::transmute(rcc)) }; } diff --git a/esp-wifi/src/lib.rs b/esp-wifi/src/lib.rs index e09a91aa..1540dc15 100644 --- a/esp-wifi/src/lib.rs +++ b/esp-wifi/src/lib.rs @@ -27,10 +27,10 @@ use esp_hal as hal; use hal::systimer::{Alarm, Target}; use common_adapter::init_radio_clock_control; -use hal::system::RadioClockController; use fugit::MegahertzU32; use hal::clock::Clocks; +use hal::system::RadioClockController; use linked_list_allocator::Heap; #[cfg(feature = "wifi")] use wifi::WifiError; @@ -237,7 +237,7 @@ pub fn initialize( init_for: EspWifiInitFor, timer: EspWifiTimer, rng: hal::rng::Rng, - radio_clocks: hal::system::RadioClockControl, + radio_clocks: hal::peripherals::RADIO_CLK, clocks: &Clocks, ) -> Result { #[cfg(any(esp32, esp32s3, esp32s2))]