diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 1c1d88bb1..ae92e0002 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml @@ -14,12 +14,13 @@ defmt = { version = "0.2.0", optional = true } log = { version = "0.4.11", optional = true } cortex-m-rt = { version = "0.6.13", features = ["device"] } cortex-m = "0.7.1" -embedded-hal = { version = "0.2.4" } +embedded-hal = { version = "0.2.4" } futures = { version = "0.3.5", default-features = false, features = ["async-await"] } rand_core = { version = "0.6.2", optional = true } sdio-host = { version = "0.5.0", optional = true } embedded-sdmmc = { git = "https://github.com/thalesfragoso/embedded-sdmmc-rs", branch = "async", optional = true } critical-section = "0.2.1" +bare-metal = "1.0.0" [build-dependencies] regex = "1.4.6" diff --git a/embassy-stm32/gen.py b/embassy-stm32/gen.py index addedc5e1..fc1986721 100644 --- a/embassy-stm32/gen.py +++ b/embassy-stm32/gen.py @@ -238,7 +238,8 @@ for chip in chips.values(): f.write(f""" pub mod interrupt {{ - pub use cortex_m::interrupt::{{CriticalSection, Mutex}}; + pub use bare_metal::Mutex; + pub use critical_section::CriticalSection; pub use embassy::interrupt::{{declare, take, Interrupt}}; pub use embassy_extras::interrupt::Priority4 as Priority;