diff options
author | Ulf Lilleengen <lulf@redhat.com> | 2022-08-25 11:23:38 +0200 |
---|---|---|
committer | Ulf Lilleengen <lulf@redhat.com> | 2022-08-25 11:23:38 +0200 |
commit | e2c16d3f3e31129808ee6781ca88d6e788f4761e (patch) | |
tree | b997268650094434506c4cac6f5bb9383a36ecc5 | |
parent | e6dbc368d2e75d5442f5f52fb8343ed04e7a6c7d (diff) | |
download | nrf-softdevice-e2c16d3f3e31129808ee6781ca88d6e788f4761e.zip |
Update after embassy-util was split
-rw-r--r-- | Cargo.lock | 59 | ||||
-rw-r--r-- | Cargo.toml | 10 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | examples/Cargo.toml | 2 | ||||
-rw-r--r-- | nrf-softdevice/Cargo.toml | 2 | ||||
-rw-r--r-- | nrf-softdevice/src/events.rs | 2 |
6 files changed, 41 insertions, 36 deletions
@@ -303,7 +303,7 @@ dependencies = [ [[package]] name = "embassy-cortex-m" version = "0.1.0" -source = "git+https://github.com/embassy-rs/embassy?rev=53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f#53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" +source = "git+https://github.com/embassy-rs/embassy?rev=529535194d4b5d58b31fd6a7541176105e3c63f7#529535194d4b5d58b31fd6a7541176105e3c63f7" dependencies = [ "atomic-polyfill 1.0.1", "cfg-if", @@ -312,16 +312,16 @@ dependencies = [ "embassy-executor", "embassy-hal-common", "embassy-macros", - "embassy-util", + "embassy-sync", ] [[package]] name = "embassy-embedded-hal" version = "0.1.0" -source = "git+https://github.com/embassy-rs/embassy?rev=53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f#53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" +source = "git+https://github.com/embassy-rs/embassy?rev=529535194d4b5d58b31fd6a7541176105e3c63f7#529535194d4b5d58b31fd6a7541176105e3c63f7" dependencies = [ "defmt", - "embassy-util", + "embassy-sync", "embedded-hal 0.2.7", "embedded-hal 1.0.0-alpha.8", "embedded-hal-async", @@ -333,7 +333,7 @@ dependencies = [ [[package]] name = "embassy-executor" version = "0.1.0" -source = "git+https://github.com/embassy-rs/embassy?rev=53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f#53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" +source = "git+https://github.com/embassy-rs/embassy?rev=529535194d4b5d58b31fd6a7541176105e3c63f7#529535194d4b5d58b31fd6a7541176105e3c63f7" dependencies = [ "atomic-polyfill 1.0.1", "cfg-if", @@ -345,9 +345,14 @@ dependencies = [ ] [[package]] +name = "embassy-futures" +version = "0.1.0" +source = "git+https://github.com/embassy-rs/embassy?rev=529535194d4b5d58b31fd6a7541176105e3c63f7#529535194d4b5d58b31fd6a7541176105e3c63f7" + +[[package]] name = "embassy-hal-common" version = "0.1.0" -source = "git+https://github.com/embassy-rs/embassy?rev=53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f#53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" +source = "git+https://github.com/embassy-rs/embassy?rev=529535194d4b5d58b31fd6a7541176105e3c63f7#529535194d4b5d58b31fd6a7541176105e3c63f7" dependencies = [ "num-traits", ] @@ -355,7 +360,7 @@ dependencies = [ [[package]] name = "embassy-macros" version = "0.1.0" -source = "git+https://github.com/embassy-rs/embassy?rev=53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f#53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" +source = "git+https://github.com/embassy-rs/embassy?rev=529535194d4b5d58b31fd6a7541176105e3c63f7#529535194d4b5d58b31fd6a7541176105e3c63f7" dependencies = [ "darling 0.13.4", "proc-macro2", @@ -366,7 +371,7 @@ dependencies = [ [[package]] name = "embassy-nrf" version = "0.1.0" -source = "git+https://github.com/embassy-rs/embassy?rev=53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f#53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" +source = "git+https://github.com/embassy-rs/embassy?rev=529535194d4b5d58b31fd6a7541176105e3c63f7#529535194d4b5d58b31fd6a7541176105e3c63f7" dependencies = [ "cfg-if", "cortex-m", @@ -377,9 +382,9 @@ dependencies = [ "embassy-embedded-hal", "embassy-executor", "embassy-hal-common", + "embassy-sync", "embassy-time", "embassy-usb", - "embassy-util", "embedded-hal 0.2.7", "embedded-hal 1.0.0-alpha.8", "embedded-hal-async", @@ -393,41 +398,41 @@ dependencies = [ ] [[package]] -name = "embassy-time" +name = "embassy-sync" version = "0.1.0" -source = "git+https://github.com/embassy-rs/embassy?rev=53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f#53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" +source = "git+https://github.com/embassy-rs/embassy?rev=529535194d4b5d58b31fd6a7541176105e3c63f7#529535194d4b5d58b31fd6a7541176105e3c63f7" dependencies = [ "atomic-polyfill 1.0.1", "cfg-if", "critical-section 1.1.0", "defmt", - "embassy-macros", - "embedded-hal 0.2.7", - "embedded-hal-async", + "embedded-io", "futures-util", + "heapless", ] [[package]] -name = "embassy-usb" +name = "embassy-time" version = "0.1.0" -source = "git+https://github.com/embassy-rs/embassy?rev=53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f#53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" +source = "git+https://github.com/embassy-rs/embassy?rev=529535194d4b5d58b31fd6a7541176105e3c63f7#529535194d4b5d58b31fd6a7541176105e3c63f7" dependencies = [ + "atomic-polyfill 1.0.1", + "cfg-if", + "critical-section 1.1.0", "defmt", - "embassy-util", - "heapless", + "embassy-macros", + "embedded-hal 0.2.7", + "embedded-hal-async", + "futures-util", ] [[package]] -name = "embassy-util" +name = "embassy-usb" version = "0.1.0" -source = "git+https://github.com/embassy-rs/embassy?rev=53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f#53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" +source = "git+https://github.com/embassy-rs/embassy?rev=529535194d4b5d58b31fd6a7541176105e3c63f7#529535194d4b5d58b31fd6a7541176105e3c63f7" dependencies = [ - "atomic-polyfill 1.0.1", - "cfg-if", - "critical-section 1.1.0", "defmt", - "embedded-io", - "futures-util", + "embassy-futures", "heapless", ] @@ -682,7 +687,7 @@ dependencies = [ "critical-section 0.2.7", "critical-section 1.1.0", "defmt", - "embassy-util", + "embassy-sync", "embedded-storage", "embedded-storage-async", "fixed", @@ -716,8 +721,8 @@ dependencies = [ "defmt-rtt", "embassy-executor", "embassy-nrf", + "embassy-sync", "embassy-time", - "embassy-util", "embedded-storage", "embedded-storage-async", "fixed", @@ -18,11 +18,11 @@ exclude = [ ] [patch.crates-io] -embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" } -embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" } -embassy-util = { git = "https://github.com/embassy-rs/embassy", rev = "53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" } -embassy-nrf = { git = "https://github.com/embassy-rs/embassy", rev = "53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" } -embassy-macros = { git = "https://github.com/embassy-rs/embassy", rev = "53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" } +embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "529535194d4b5d58b31fd6a7541176105e3c63f7" } +embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "529535194d4b5d58b31fd6a7541176105e3c63f7" } +embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "529535194d4b5d58b31fd6a7541176105e3c63f7" } +embassy-nrf = { git = "https://github.com/embassy-rs/embassy", rev = "529535194d4b5d58b31fd6a7541176105e3c63f7" } +embassy-macros = { git = "https://github.com/embassy-rs/embassy", rev = "529535194d4b5d58b31fd6a7541176105e3c63f7" } [profile.release] codegen-units = 1 @@ -137,7 +137,7 @@ DO NOT disable the softdevice's interrupts. You MUST NOT use the widely-used `co - Make sure the `critical-section-impl` Cargo feature is enabled for `nrf-softdevice`. This makes `nrf-softdevice` emit a custom critical section implementation that disables only non-softdevice interrupts. - Use `critical_section::with` instead of `cortex_m::interrupt::free`. This uses the custom critical-section impl. -- Use `embassy_util::blocking_mutex::CriticalSectionMutex` instead of `cortex_m::interrupt::Mutex`. +- Use `embassy_sync::blocking_mutex::CriticalSectionMutex` instead of `cortex_m::interrupt::Mutex`. Make sure you're not using any library that internally uses `cortex_m::interrupt::free` as well. diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 75baa0a..b3f03a9 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -18,7 +18,7 @@ ble-gatt-client = ["nrf-softdevice/ble-gatt-client"] [dependencies] embassy-executor = { version = "0.1.0", features = ["nightly", "defmt"]} embassy-time = { version = "0.1.0", features = ["nightly", "defmt", "defmt-timestamp-uptime"]} -embassy-util = { version = "0.1.0" } +embassy-sync = { version = "0.1.0" } embassy-nrf = { version = "0.1.0", features = [ "nightly", "defmt", "nrf52840", "gpiote", "time-driver-rtc1" ]} cortex-m = "0.7.2" cortex-m-rt = "0.7.0" diff --git a/nrf-softdevice/Cargo.toml b/nrf-softdevice/Cargo.toml index 40f582c..e06cde8 100644 --- a/nrf-softdevice/Cargo.toml +++ b/nrf-softdevice/Cargo.toml @@ -42,7 +42,7 @@ critical-section-02 = { package = "critical-section", version = "0.2", optional critical-section-1 = { package = "critical-section", version = "1.0", optional = true } num_enum = { version = "0.5.1", default-features = false } -embassy-util = { version = "0.1.0" } +embassy-sync = { version = "0.1.0" } cortex-m = "0.7.2" cortex-m-rt = ">=0.6.15,<0.8" heapless = "0.7.1" diff --git a/nrf-softdevice/src/events.rs b/nrf-softdevice/src/events.rs index 794f3df..98df169 100644 --- a/nrf-softdevice/src/events.rs +++ b/nrf-softdevice/src/events.rs @@ -1,7 +1,7 @@ use core::mem::MaybeUninit; use core::task::Poll; -use embassy_util::waitqueue::AtomicWaker; +use embassy_sync::waitqueue::AtomicWaker; use futures::future::poll_fn; use num_enum::{IntoPrimitive, TryFromPrimitive}; |