diff --git a/Cargo.toml b/Cargo.toml index 424ca13..6382a68 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ esp-backtrace = { version = "0.11.0", features = [ "panic-handler", "println", ] } -esp-hal = { version = "0.16.0", features = [ "{{ mcu }}" ] } +esp-hal = { version = "0.17.0", features = [ "{{ mcu }}" ] } esp-println = { version = "0.9.0", features = ["{{ mcu }}", "log"] } log = { version = "0.4.20" } {% if alloc -%} @@ -21,7 +21,7 @@ esp-alloc = { version = "0.3.0" } {% if wifi -%} embedded-svc = { version = "0.26.1", default-features = false, features = [] } embedded-io = "0.6.1" -esp-wifi = { version = "0.4.0", features = [ +esp-wifi = { version = "0.5.0", features = [ "{{ mcu }}", "phy-enable-usb", "utils", diff --git a/pre-script.rhai b/pre-script.rhai index 89b999c..d4b92fd 100644 --- a/pre-script.rhai +++ b/pre-script.rhai @@ -4,19 +4,19 @@ let metadata = #{ wokwi_board: "board-esp32-devkit-c-v4", esp_wifi_init: "Wifi", esp_wifi_feature: "wifi", - esp_wifi_timer: "timer::TimerGroup::new(peripherals.TIMG1, &clocks).timer0" + esp_wifi_timer: "timer::TimerGroup::new(peripherals.TIMG1, &clocks, None).timer0" }, esp32s2: #{ wokwi_board: "board-esp32-s2-devkitm-1", esp_wifi_init: "Wifi", esp_wifi_feature: "wifi", - esp_wifi_timer: "timer::TimerGroup::new(peripherals.TIMG1, &clocks).timer0" + esp_wifi_timer: "timer::TimerGroup::new(peripherals.TIMG1, &clocks, None).timer0" }, esp32s3: #{ wokwi_board: "board-esp32-s3-devkitc-1", esp_wifi_init: "Wifi", esp_wifi_feature: "wifi", - esp_wifi_timer: "timer::TimerGroup::new(peripherals.TIMG1, &clocks).timer0" + esp_wifi_timer: "timer::TimerGroup::new(peripherals.TIMG1, &clocks, None).timer0" }, // RISC-V devices: diff --git a/src/main.rs b/src/main.rs index 159eb01..255e43b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,7 +2,7 @@ #![no_main] use esp_backtrace as _; -use esp_hal::{clock::ClockControl, peripherals::Peripherals, prelude::*, Delay}; +use esp_hal::{clock::ClockControl, peripherals::Peripherals, prelude::*, delay::Delay}; {% if alloc -%} {{ alloc_snippet }} @@ -14,7 +14,7 @@ fn main() -> ! { let system = peripherals.SYSTEM.split(); let clocks = ClockControl::max(system.clock_control).freeze(); - let mut delay = Delay::new(&clocks); + let delay = Delay::new(&clocks); {%- if alloc %} init_heap(); @@ -28,6 +28,6 @@ fn main() -> ! { loop { log::info!("Hello world!"); - delay.delay_ms(500u32); + delay.delay(500.millis()); } }