Split embassy crate into embassy-executor, embassy-util.
This commit is contained in:
@ -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 }
|
||||
|
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user