aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThales Fragoso <[email protected]>2021-05-22 23:53:50 -0300
committerThales Fragoso <[email protected]>2021-05-22 23:53:50 -0300
commit2b1d7fe3eec3b18aa418694badf5d8e99ad0bf92 (patch)
treea023e1f5a9938216f91c0bafcedfb379724e7034
parent7c06518c52fd5fd793650abd7e2f1a82baf537b8 (diff)
Use Mutex and CriticalSection from bare-metal 1.0
-rw-r--r--embassy-stm32/Cargo.toml3
-rw-r--r--embassy-stm32/gen.py3
2 files changed, 4 insertions, 2 deletions
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 }
14log = { version = "0.4.11", optional = true } 14log = { version = "0.4.11", optional = true }
15cortex-m-rt = { version = "0.6.13", features = ["device"] } 15cortex-m-rt = { version = "0.6.13", features = ["device"] }
16cortex-m = "0.7.1" 16cortex-m = "0.7.1"
17embedded-hal = { version = "0.2.4" } 17embedded-hal = { version = "0.2.4" }
18futures = { version = "0.3.5", default-features = false, features = ["async-await"] } 18futures = { version = "0.3.5", default-features = false, features = ["async-await"] }
19rand_core = { version = "0.6.2", optional = true } 19rand_core = { version = "0.6.2", optional = true }
20sdio-host = { version = "0.5.0", optional = true } 20sdio-host = { version = "0.5.0", optional = true }
21embedded-sdmmc = { git = "https://github.com/thalesfragoso/embedded-sdmmc-rs", branch = "async", optional = true } 21embedded-sdmmc = { git = "https://github.com/thalesfragoso/embedded-sdmmc-rs", branch = "async", optional = true }
22critical-section = "0.2.1" 22critical-section = "0.2.1"
23bare-metal = "1.0.0"
23 24
24[build-dependencies] 25[build-dependencies]
25regex = "1.4.6" 26regex = "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():
238 238
239 f.write(f""" 239 f.write(f"""
240 pub mod interrupt {{ 240 pub mod interrupt {{
241 pub use cortex_m::interrupt::{{CriticalSection, Mutex}}; 241 pub use bare_metal::Mutex;
242 pub use critical_section::CriticalSection;
242 pub use embassy::interrupt::{{declare, take, Interrupt}}; 243 pub use embassy::interrupt::{{declare, take, Interrupt}};
243 pub use embassy_extras::interrupt::Priority4 as Priority; 244 pub use embassy_extras::interrupt::Priority4 as Priority;
244 245