Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
build: Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez committed Jun 5, 2024
1 parent c5064f0 commit 8cd1644
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
esp-backtrace = { version = "0.11.0", features = [
esp-backtrace = { version = "0.12.0", features = [
"{{ mcu }}",
"exception-handler",
"panic-handler",
"println",
] }
esp-hal = { version = "0.17.0", features = [ "{{ mcu }}" ] }
esp-println = { version = "0.9.0", features = ["{{ mcu }}", "log"] }
log = { version = "0.4.20" }
esp-hal = { version = "0.18.0", features = [ "{{ mcu }}" ] }
esp-println = { version = "0.9.1", features = ["{{ mcu }}", "log"] }
log = { version = "0.4.21" }
{% if alloc -%}
esp-alloc = { version = "0.3.0" }
esp-alloc = { version = "0.4.0" }
{% endif -%}
{% if wifi -%}
embedded-svc = { version = "0.26.1", default-features = false, features = [] }
embedded-io = "0.6.1"
esp-wifi = { version = "0.5.0", features = [
esp-wifi = { version = "0.6.0", features = [
"{{ mcu }}",
"phy-enable-usb",
"utils",
Expand All @@ -42,7 +42,7 @@ smoltcp = { version = "0.11.0", default-features = false, features = [
{% endif -%}

[profile.dev]
# Rust debug is too slow.
# Rust debug is too slow.
# For debug builds always builds with some optimization
opt-level = "s"

Expand Down
16 changes: 8 additions & 8 deletions pre-script.rhai
Original file line number Diff line number Diff line change
Expand Up @@ -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, None).timer0"
esp_wifi_timer: "timer::timg::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, None).timer0"
esp_wifi_timer: "timer::timg::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, None).timer0"
esp_wifi_timer: "timer::timg::TimerGroup::new(peripherals.TIMG1, &clocks, None).timer0"
},

// RISC-V devices:
Expand All @@ -25,28 +25,28 @@ let metadata = #{
wokwi_board: "",
esp_wifi_init: "Wifi",
esp_wifi_feature: "wifi",
esp_wifi_timer: "systimer::SystemTimer::new(peripherals.SYSTIMER).alarm0"
esp_wifi_timer: "timer::systimer::SystemTimer::new(peripherals.SYSTIMER).alarm0"
},
esp32c3: #{
extensions: "imc",
wokwi_board: "board-esp32-c3-devkitm-1",
esp_wifi_init: "Wifi",
esp_wifi_feature: "wifi",
esp_wifi_timer: "systimer::SystemTimer::new(peripherals.SYSTIMER).alarm0"
esp_wifi_timer: "timer::systimer::SystemTimer::new(peripherals.SYSTIMER).alarm0"
},
esp32c6: #{
extensions: "imac",
wokwi_board: "board-esp32-c6-devkitc-1",
esp_wifi_init: "Wifi",
esp_wifi_feature: "wifi",
esp_wifi_timer: "systimer::SystemTimer::new(peripherals.SYSTIMER).alarm0"
esp_wifi_timer: "timer::systimer::SystemTimer::new(peripherals.SYSTIMER).alarm0"
},
esp32h2: #{
extensions: "imac",
wokwi_board: "board-esp32-h2-devkitm-1",
esp_wifi_init: "Ble",
esp_wifi_feature: "ble",
esp_wifi_timer: "systimer::SystemTimer::new(peripherals.SYSTIMER).alarm0"
esp_wifi_timer: "timer::systimer::SystemTimer::new(peripherals.SYSTIMER).alarm0"
},
};

Expand Down Expand Up @@ -112,7 +112,7 @@ let _init = esp_wifi::initialize(
esp_wifi::EspWifiInitFor::${meta.esp_wifi_init},
timer,
esp_hal::rng::Rng::new(peripherals.RNG),
system.radio_clock_control,
peripherals.RADIO_CLK,
&clocks,
)
.unwrap();
Expand Down
6 changes: 4 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#![no_main]

use esp_backtrace as _;
use esp_hal::{clock::ClockControl, peripherals::Peripherals, prelude::*, delay::Delay};
use esp_hal::{
clock::ClockControl, delay::Delay, peripherals::Peripherals, prelude::*, system::SystemControl,
};

{% if alloc -%}
{{ alloc_snippet }}
Expand All @@ -11,7 +13,7 @@ use esp_hal::{clock::ClockControl, peripherals::Peripherals, prelude::*, delay::
#[entry]
fn main() -> ! {
let peripherals = Peripherals::take();
let system = peripherals.SYSTEM.split();
let system = SystemControl::new(peripherals.SYSTEM);

let clocks = ClockControl::max(system.clock_control).freeze();
let delay = Delay::new(&clocks);
Expand Down

0 comments on commit 8cd1644

Please sign in to comment.