Skip to content

Commit cb0b4e2

Browse files
committed
update to compile with latest esp-hal git main
1 parent 2ceb4b3 commit cb0b4e2

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Fixed
1313

14+
- update with Timer and peripheral naming changes in `esp-hal`
15+
1416
### Changed
1517

1618
### Removed

esp-wifi/src/common_adapter/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use crate::compat::timer_compat::*;
1212
use crate::hal;
1313

1414
use esp_wifi_sys::include::timespec;
15+
use hal::peripherals::RADIO_CLK;
1516
use hal::rng::Rng;
16-
use hal::system::RadioClockControl;
1717

1818
use hal::macros::ram;
1919

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

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

40-
pub(crate) static mut RADIO_CLOCKS: Option<RadioClockControl> = None;
40+
pub(crate) static mut RADIO_CLOCKS: Option<RADIO_CLK> = None;
4141

4242
pub(crate) fn init_rng(rng: Rng) {
4343
unsafe { RANDOM_GENERATOR = Some(core::mem::transmute(rng)) };
4444
}
4545

46-
pub(crate) fn init_radio_clock_control(rcc: RadioClockControl) {
46+
pub(crate) fn init_radio_clock_control(rcc: RADIO_CLK) {
4747
unsafe { RADIO_CLOCKS = Some(core::mem::transmute(rcc)) };
4848
}
4949

esp-wifi/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ use esp_hal as hal;
2727
use hal::systimer::{Alarm, Target};
2828

2929
use common_adapter::init_radio_clock_control;
30-
use hal::system::RadioClockController;
3130

3231
use fugit::MegahertzU32;
3332
use hal::clock::Clocks;
33+
use hal::system::RadioClockController;
3434
use linked_list_allocator::Heap;
3535
#[cfg(feature = "wifi")]
3636
use wifi::WifiError;
@@ -160,7 +160,7 @@ pub(crate) type EspWifiTimer = Alarm<Target, esp_hal::Blocking, 0>;
160160

161161
#[cfg(any(esp32, esp32s3, esp32s2))]
162162
pub(crate) type EspWifiTimer =
163-
hal::timer::Timer<hal::timer::Timer0<hal::peripherals::TIMG1>, esp_hal::Blocking>;
163+
hal::timer::timg::Timer<hal::timer::timg::Timer0<hal::peripherals::TIMG1>, esp_hal::Blocking>;
164164

165165
#[derive(Debug, PartialEq, PartialOrd)]
166166
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
@@ -237,7 +237,7 @@ pub fn initialize(
237237
init_for: EspWifiInitFor,
238238
timer: EspWifiTimer,
239239
rng: hal::rng::Rng,
240-
radio_clocks: hal::system::RadioClockControl,
240+
radio_clocks: hal::peripherals::RADIO_CLK,
241241
clocks: &Clocks,
242242
) -> Result<EspWifiInitialization, InitializationError> {
243243
#[cfg(any(esp32, esp32s3, esp32s2))]

esp-wifi/src/timer/xtensa.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::{
99
interrupt,
1010
peripherals::{self, TIMG1},
1111
prelude::*,
12-
timer::{Timer, Timer0},
12+
timer::timg::{Timer, Timer0},
1313
trapframe::TrapFrame,
1414
xtensa_lx, xtensa_lx_rt,
1515
},

0 commit comments

Comments
 (0)