Skip to content

Commit 6cf8b65

Browse files
authored
Merge pull request #59 from SergioGasquez/feat/esp-hal-0-21
Update code to esp-hal 0.21 releases
2 parents 2ff05c6 + 5e73a44 commit 6cf8b65

File tree

35 files changed

+2637
-1808
lines changed

35 files changed

+2637
-1808
lines changed

advanced/stack-overflow-detection/Cargo.lock

Lines changed: 226 additions & 165 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

advanced/stack-overflow-detection/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55
license = "MIT OR Apache-2.0"
66

77
[dependencies]
8-
esp-hal = { version = "0.20.1", features = ["esp32c3"] }
9-
esp-backtrace = { version = "0.14.0", features = ["esp32c3", "panic-handler", "exception-handler", "println"] }
10-
esp-println = { version = "0.11.0", features = ["esp32c3"] }
8+
esp-hal = { version = "0.21.0", features = ["esp32c3"] }
9+
esp-backtrace = { version = "0.14.2", features = ["esp32c3", "panic-handler", "exception-handler", "println"] }
10+
esp-println = { version = "0.12.0", features = ["esp32c3"] }
1111
critical-section = "1.1.3"

advanced/stack-overflow-detection/examples/stack-overflow-detection.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,12 @@ use core::cell::RefCell;
55

66
use critical_section::Mutex;
77
use esp_backtrace as _;
8-
use esp_hal::{
9-
assist_debug::DebugAssist, clock::ClockControl, peripherals::Peripherals, prelude::*,
10-
system::SystemControl,
11-
};
8+
use esp_hal::{assist_debug::DebugAssist, prelude::*};
129
use esp_println::println;
1310

1411
#[entry]
1512
fn main() -> ! {
16-
let peripherals = Peripherals::take();
17-
let system = SystemControl::new(peripherals.SYSTEM);
18-
let _ = ClockControl::boot_defaults(system.clock_control).freeze();
13+
let peripherals = esp_hal::init(esp_hal::Config::default());
1914

2015
// get the debug assist driver
2116
let mut da = DebugAssist::new(peripherals.ASSIST_DEBUG);

advanced/stack-overflow-detection/src/main.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,12 @@ use core::cell::RefCell;
55

66
use critical_section::Mutex;
77
use esp_backtrace as _;
8-
use esp_hal::{
9-
assist_debug::DebugAssist, clock::ClockControl, peripherals::Peripherals, prelude::*,
10-
system::SystemControl,
11-
};
8+
use esp_hal::{assist_debug::DebugAssist, prelude::*};
129
use esp_println::println;
1310

1411
#[entry]
1512
fn main() -> ! {
16-
let peripherals = Peripherals::take();
17-
let system = SystemControl::new(peripherals.SYSTEM);
18-
let _ = ClockControl::boot_defaults(system.clock_control).freeze();
13+
let peripherals = esp_hal::init(esp_hal::Config::default());
1914

2015
// get the debug assist driver
2116
let da = DebugAssist::new(peripherals.ASSIST_DEBUG);

0 commit comments

Comments
 (0)