Skip to content

Commit 511e224

Browse files
DdystopiaAfoHT
authored andcommitted
chore: replace deprecated bare-metal with critical-section
1 parent 299382c commit 511e224

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

book/en/src/by-example/app_init.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ signature `fn(init::Context) -> (Shared, Local)`, where `Shared` and `Local` are
55

66
The `init` task executes after system reset, [after an optionally defined `pre-init` code section][^pre-init] and an always occurring internal RTIC initialization.
77

8-
The `init` and optional `pre-init` tasks runs _with interrupts disabled_ and have exclusive access to Cortex-M (the `bare_metal::CriticalSection` token is available as `cs`).
8+
The `init` and optional `pre-init` tasks runs _with interrupts disabled_ and have exclusive access to Cortex-M (the `critical_section::CriticalSection` token is available as `cs`).
99

1010
Device specific peripherals are available through the `core` and `device` fields of `init::Context`.
1111

examples/lm3s6965/Cargo.lock

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

examples/lm3s6965/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ edition = "2021"
1212
heapless = "0.8"
1313
lm3s6965 = "0.2"
1414
cortex-m = "0.7.0"
15-
bare-metal = "1.0.0"
1615
cortex-m-semihosting = "0.5.0"
1716
rtic-time = { path = "../../rtic-time" }
1817
rtic-sync = { path = "../../rtic-sync" }

examples/lm3s6965/examples/init.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ mod app {
3131

3232
// Access to the critical section token,
3333
// to indicate that this is a critical section
34-
let _cs_token: bare_metal::CriticalSection = cx.cs;
34+
let _cs_token: rtic::export::CriticalSection = cx.cs;
3535

3636
hprintln!("init");
3737

rtic/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ esp32c3 = { version = "0.30.0", optional = true }
3030
esp32c6 = { version = "0.21.0", optional = true }
3131
riscv = { version = "0.15.0", optional = true }
3232
cortex-m = { version = "0.7.0", optional = true }
33-
bare-metal = "1.0.0"
3433
portable-atomic = { version = "1", default-features = false }
3534
rtic-macros = { path = "../rtic-macros", version = "=2.2.0" }
3635
rtic-core = "1"

rtic/src/export.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub use bare_metal::CriticalSection;
1+
pub use critical_section::CriticalSection;
22
pub use portable_atomic as atomic;
33

44
pub mod executor;

0 commit comments

Comments
 (0)