Skip to content

Commit

Permalink
update to compile with latest esp-hal git main
Browse files Browse the repository at this point in the history
  • Loading branch information
liebman committed Apr 28, 2024
1 parent 60cd936 commit f554ece
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions esp-wifi/src/common_adapter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -37,13 +37,13 @@ pub(crate) mod phy_init_data;

pub(crate) static mut RANDOM_GENERATOR: Option<Rng> = None;

pub(crate) static mut RADIO_CLOCKS: Option<RadioClockControl> = None;
pub(crate) static mut RADIO_CLOCKS: Option<RADIO_CLK> = 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)) };
}

Expand Down
4 changes: 2 additions & 2 deletions esp-wifi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<EspWifiInitialization, InitializationError> {
#[cfg(any(esp32, esp32s3, esp32s2))]
Expand Down

0 comments on commit f554ece

Please sign in to comment.