summaryrefslogtreecommitdiff
path: root/embassy-hal-common
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2022-07-29 21:58:35 +0200
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2022-07-29 23:40:36 +0200
commita0f1b0ee01d461607660d2d56b5b1bdc57e0d3fb (patch)
treee60fc8f8db8ec07e55d655c1a830b07f4db0b7d2 /embassy-hal-common
parent8745d646f0976791b7098456aa61adb983fb1c18 (diff)
downloadembassy-a0f1b0ee01d461607660d2d56b5b1bdc57e0d3fb.zip
Split embassy crate into embassy-executor, embassy-util.
Diffstat (limited to 'embassy-hal-common')
-rw-r--r--embassy-hal-common/Cargo.toml5
-rw-r--r--embassy-hal-common/src/lib.rs10
2 files changed, 2 insertions, 13 deletions
diff --git a/embassy-hal-common/Cargo.toml b/embassy-hal-common/Cargo.toml
index f7ebcc21..4a6a6100 100644
--- a/embassy-hal-common/Cargo.toml
+++ b/embassy-hal-common/Cargo.toml
@@ -6,9 +6,8 @@ edition = "2021"
[features]
[dependencies]
-embassy = { version = "0.1.0", path = "../embassy" }
-
defmt = { version = "0.3", optional = true }
log = { version = "0.4.14", optional = true }
-cortex-m = "0.7.3"
+
+embassy-util = { version = "0.1.0", path = "../embassy-util" }
num-traits = { version = "0.2.14", default-features = false }
diff --git a/embassy-hal-common/src/lib.rs b/embassy-hal-common/src/lib.rs
index d3d9e0a8..5d2649d0 100644
--- a/embassy-hal-common/src/lib.rs
+++ b/embassy-hal-common/src/lib.rs
@@ -10,13 +10,3 @@ mod peripheral;
pub mod ratio;
pub mod ring_buffer;
pub use peripheral::{Peripheral, PeripheralRef};
-
-/// Low power blocking wait loop using WFE/SEV.
-pub fn low_power_wait_until(mut condition: impl FnMut() -> bool) {
- while !condition() {
- // WFE might "eat" an event that would have otherwise woken the executor.
- cortex_m::asm::wfe();
- }
- // Retrigger an event to be transparent to the executor.
- cortex_m::asm::sev();
-}