diff options
| author | sander <[email protected]> | 2023-04-14 10:44:51 +0200 |
|---|---|---|
| committer | sander <[email protected]> | 2023-04-14 10:44:51 +0200 |
| commit | ce0e1a5db36505884e7f46577b4b407808c20a82 (patch) | |
| tree | 0e87248c13f3bac757560235faa2485acf81ce90 | |
| parent | 1b86570cfd480b0821de555780a2dbdaa7ec562d (diff) | |
| parent | a3ecf5caf614e17b2e1cb3d1f79d8313f2e71a63 (diff) | |
Merge commit '82f528927b2fde275c2e9b6fd737baf439cb296a'
80 files changed, 251 insertions, 99 deletions
| @@ -117,12 +117,14 @@ cargo batch \ | |||
| 117 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi --out-dir out/tests/nucleo-stm32f429zi \ | 117 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi --out-dir out/tests/nucleo-stm32f429zi \ |
| 118 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32g491re --out-dir out/tests/nucleo-stm32g491re \ | 118 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32g491re --out-dir out/tests/nucleo-stm32g491re \ |
| 119 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32g071rb --out-dir out/tests/nucleo-stm32g071rb \ | 119 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32g071rb --out-dir out/tests/nucleo-stm32g071rb \ |
| 120 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32c031c6 --out-dir out/tests/nucleo-stm32c031c6 \ | ||
| 120 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h755zi --out-dir out/tests/nucleo-stm32h755zi \ | 121 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h755zi --out-dir out/tests/nucleo-stm32h755zi \ |
| 121 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wb55rg --out-dir out/tests/nucleo-stm32wb55rg \ | 122 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wb55rg --out-dir out/tests/nucleo-stm32wb55rg \ |
| 122 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h563zi --out-dir out/tests/nucleo-stm32h563zi \ | 123 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h563zi --out-dir out/tests/nucleo-stm32h563zi \ |
| 123 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32u585ai --out-dir out/tests/iot-stm32u585ai \ | 124 | --- build --release --manifest-path tests/stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32u585ai --out-dir out/tests/iot-stm32u585ai \ |
| 124 | --- build --release --manifest-path tests/rp/Cargo.toml --target thumbv6m-none-eabi --out-dir out/tests/rpi-pico \ | 125 | --- build --release --manifest-path tests/rp/Cargo.toml --target thumbv6m-none-eabi --out-dir out/tests/rpi-pico \ |
| 125 | --- build --release --manifest-path tests/nrf/Cargo.toml --target thumbv7em-none-eabi --out-dir out/tests/nrf52840-dk \ | 126 | --- build --release --manifest-path tests/nrf/Cargo.toml --target thumbv7em-none-eabi --out-dir out/tests/nrf52840-dk \ |
| 127 | --- build --release --manifest-path tests/riscv32/Cargo.toml --target riscv32imac-unknown-none-elf \ | ||
| 126 | $BUILD_EXTRA | 128 | $BUILD_EXTRA |
| 127 | 129 | ||
| 128 | 130 | ||
diff --git a/embassy-boot/boot/Cargo.toml b/embassy-boot/boot/Cargo.toml index 39f501570..956b0f987 100644 --- a/embassy-boot/boot/Cargo.toml +++ b/embassy-boot/boot/Cargo.toml | |||
| @@ -27,7 +27,7 @@ defmt = { version = "0.3", optional = true } | |||
| 27 | digest = "0.10" | 27 | digest = "0.10" |
| 28 | log = { version = "0.4", optional = true } | 28 | log = { version = "0.4", optional = true } |
| 29 | ed25519-dalek = { version = "1.0.1", default_features = false, features = ["u32_backend"], optional = true } | 29 | ed25519-dalek = { version = "1.0.1", default_features = false, features = ["u32_backend"], optional = true } |
| 30 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync" } | 30 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync" } |
| 31 | embedded-storage = "0.3.0" | 31 | embedded-storage = "0.3.0" |
| 32 | embedded-storage-async = { version = "0.4.0", optional = true} | 32 | embedded-storage-async = { version = "0.4.0", optional = true} |
| 33 | salty = { git = "https://github.com/ycrypto/salty.git", rev = "a9f17911a5024698406b75c0fac56ab5ccf6a8c7", optional = true } | 33 | salty = { git = "https://github.com/ycrypto/salty.git", rev = "a9f17911a5024698406b75c0fac56ab5ccf6a8c7", optional = true } |
diff --git a/embassy-cortex-m/Cargo.toml b/embassy-cortex-m/Cargo.toml index 5c5718d50..c2c4759dc 100644 --- a/embassy-cortex-m/Cargo.toml +++ b/embassy-cortex-m/Cargo.toml | |||
| @@ -36,7 +36,7 @@ prio-bits-8 = [] | |||
| 36 | defmt = { version = "0.3", optional = true } | 36 | defmt = { version = "0.3", optional = true } |
| 37 | log = { version = "0.4.14", optional = true } | 37 | log = { version = "0.4.14", optional = true } |
| 38 | 38 | ||
| 39 | embassy-sync = { version = "0.1.0", path = "../embassy-sync" } | 39 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } |
| 40 | embassy-executor = { version = "0.1.0", path = "../embassy-executor"} | 40 | embassy-executor = { version = "0.1.0", path = "../embassy-executor"} |
| 41 | embassy-macros = { version = "0.1.0", path = "../embassy-macros"} | 41 | embassy-macros = { version = "0.1.0", path = "../embassy-macros"} |
| 42 | embassy-hal-common = { version = "0.1.0", path = "../embassy-hal-common"} | 42 | embassy-hal-common = { version = "0.1.0", path = "../embassy-hal-common"} |
diff --git a/embassy-embedded-hal/Cargo.toml b/embassy-embedded-hal/Cargo.toml index c509d6ee5..19d512585 100644 --- a/embassy-embedded-hal/Cargo.toml +++ b/embassy-embedded-hal/Cargo.toml | |||
| @@ -17,7 +17,7 @@ std = [] | |||
| 17 | nightly = ["embedded-hal-async", "embedded-storage-async"] | 17 | nightly = ["embedded-hal-async", "embedded-storage-async"] |
| 18 | 18 | ||
| 19 | [dependencies] | 19 | [dependencies] |
| 20 | embassy-sync = { version = "0.1.0", path = "../embassy-sync" } | 20 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } |
| 21 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } | 21 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } |
| 22 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.10" } | 22 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.10" } |
| 23 | embedded-hal-async = { version = "=0.2.0-alpha.1", optional = true } | 23 | embedded-hal-async = { version = "=0.2.0-alpha.1", optional = true } |
diff --git a/embassy-executor/src/arch/riscv32.rs b/embassy-executor/src/arch/riscv32.rs index f66daeae4..ff7ec1575 100644 --- a/embassy-executor/src/arch/riscv32.rs +++ b/embassy-executor/src/arch/riscv32.rs | |||
| @@ -8,6 +8,9 @@ mod thread { | |||
| 8 | use core::marker::PhantomData; | 8 | use core::marker::PhantomData; |
| 9 | use core::sync::atomic::{AtomicBool, Ordering}; | 9 | use core::sync::atomic::{AtomicBool, Ordering}; |
| 10 | 10 | ||
| 11 | #[cfg(feature = "nightly")] | ||
| 12 | pub use embassy_macros::main_riscv as main; | ||
| 13 | |||
| 11 | use crate::raw::{Pender, PenderInner}; | 14 | use crate::raw::{Pender, PenderInner}; |
| 12 | use crate::{raw, Spawner}; | 15 | use crate::{raw, Spawner}; |
| 13 | 16 | ||
diff --git a/embassy-hal-common/src/macros.rs b/embassy-hal-common/src/macros.rs index da7913136..5e62e048a 100644 --- a/embassy-hal-common/src/macros.rs +++ b/embassy-hal-common/src/macros.rs | |||
| @@ -92,7 +92,7 @@ macro_rules! impl_peripheral { | |||
| 92 | type P = $type; | 92 | type P = $type; |
| 93 | 93 | ||
| 94 | #[inline] | 94 | #[inline] |
| 95 | unsafe fn clone_unchecked(&mut self) -> Self::P { | 95 | unsafe fn clone_unchecked(&self) -> Self::P { |
| 96 | $type { ..*self } | 96 | $type { ..*self } |
| 97 | } | 97 | } |
| 98 | } | 98 | } |
diff --git a/embassy-hal-common/src/peripheral.rs b/embassy-hal-common/src/peripheral.rs index 4a6b6a600..c7133bac6 100644 --- a/embassy-hal-common/src/peripheral.rs +++ b/embassy-hal-common/src/peripheral.rs | |||
| @@ -39,7 +39,7 @@ impl<'a, T> PeripheralRef<'a, T> { | |||
| 39 | /// You should strongly prefer using `reborrow()` instead. It returns a | 39 | /// You should strongly prefer using `reborrow()` instead. It returns a |
| 40 | /// `PeripheralRef` that borrows `self`, which allows the borrow checker | 40 | /// `PeripheralRef` that borrows `self`, which allows the borrow checker |
| 41 | /// to enforce this at compile time. | 41 | /// to enforce this at compile time. |
| 42 | pub unsafe fn clone_unchecked(&mut self) -> PeripheralRef<'a, T> | 42 | pub unsafe fn clone_unchecked(&self) -> PeripheralRef<'a, T> |
| 43 | where | 43 | where |
| 44 | T: Peripheral<P = T>, | 44 | T: Peripheral<P = T>, |
| 45 | { | 45 | { |
| @@ -146,14 +146,14 @@ pub trait Peripheral: Sized { | |||
| 146 | /// | 146 | /// |
| 147 | /// You should strongly prefer using `into_ref()` instead. It returns a | 147 | /// You should strongly prefer using `into_ref()` instead. It returns a |
| 148 | /// `PeripheralRef`, which allows the borrow checker to enforce this at compile time. | 148 | /// `PeripheralRef`, which allows the borrow checker to enforce this at compile time. |
| 149 | unsafe fn clone_unchecked(&mut self) -> Self::P; | 149 | unsafe fn clone_unchecked(&self) -> Self::P; |
| 150 | 150 | ||
| 151 | /// Convert a value into a `PeripheralRef`. | 151 | /// Convert a value into a `PeripheralRef`. |
| 152 | /// | 152 | /// |
| 153 | /// When called on an owned `T`, yields a `PeripheralRef<'static, T>`. | 153 | /// When called on an owned `T`, yields a `PeripheralRef<'static, T>`. |
| 154 | /// When called on an `&'a mut T`, yields a `PeripheralRef<'a, T>`. | 154 | /// When called on an `&'a mut T`, yields a `PeripheralRef<'a, T>`. |
| 155 | #[inline] | 155 | #[inline] |
| 156 | fn into_ref<'a>(mut self) -> PeripheralRef<'a, Self::P> | 156 | fn into_ref<'a>(self) -> PeripheralRef<'a, Self::P> |
| 157 | where | 157 | where |
| 158 | Self: 'a, | 158 | Self: 'a, |
| 159 | { | 159 | { |
| @@ -161,14 +161,14 @@ pub trait Peripheral: Sized { | |||
| 161 | } | 161 | } |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | impl<'b, T: DerefMut> Peripheral for T | 164 | impl<'b, T: Deref> Peripheral for T |
| 165 | where | 165 | where |
| 166 | T::Target: Peripheral, | 166 | T::Target: Peripheral, |
| 167 | { | 167 | { |
| 168 | type P = <T::Target as Peripheral>::P; | 168 | type P = <T::Target as Peripheral>::P; |
| 169 | 169 | ||
| 170 | #[inline] | 170 | #[inline] |
| 171 | unsafe fn clone_unchecked(&mut self) -> Self::P { | 171 | unsafe fn clone_unchecked(&self) -> Self::P { |
| 172 | self.deref_mut().clone_unchecked() | 172 | self.deref().clone_unchecked() |
| 173 | } | 173 | } |
| 174 | } | 174 | } |
diff --git a/embassy-lora/Cargo.toml b/embassy-lora/Cargo.toml index 604358c5b..79d5660f4 100644 --- a/embassy-lora/Cargo.toml +++ b/embassy-lora/Cargo.toml | |||
| @@ -29,7 +29,7 @@ defmt = { version = "0.3", optional = true } | |||
| 29 | log = { version = "0.4.14", optional = true } | 29 | log = { version = "0.4.14", optional = true } |
| 30 | 30 | ||
| 31 | embassy-time = { version = "0.1.0", path = "../embassy-time" } | 31 | embassy-time = { version = "0.1.0", path = "../embassy-time" } |
| 32 | embassy-sync = { version = "0.1.0", path = "../embassy-sync" } | 32 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } |
| 33 | embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32", default-features = false, optional = true } | 33 | embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32", default-features = false, optional = true } |
| 34 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.10" } | 34 | embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.10" } |
| 35 | embedded-hal-async = { version = "=0.2.0-alpha.1" } | 35 | embedded-hal-async = { version = "=0.2.0-alpha.1" } |
diff --git a/embassy-net-driver-channel/Cargo.toml b/embassy-net-driver-channel/Cargo.toml index 6cb6c3568..e475551e1 100644 --- a/embassy-net-driver-channel/Cargo.toml +++ b/embassy-net-driver-channel/Cargo.toml | |||
| @@ -13,6 +13,6 @@ target = "thumbv7em-none-eabi" | |||
| 13 | defmt = { version = "0.3", optional = true } | 13 | defmt = { version = "0.3", optional = true } |
| 14 | log = { version = "0.4.14", optional = true } | 14 | log = { version = "0.4.14", optional = true } |
| 15 | 15 | ||
| 16 | embassy-sync = { version = "0.1.0", path = "../embassy-sync" } | 16 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } |
| 17 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 17 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| 18 | embassy-net-driver = { version = "0.1.0", path = "../embassy-net-driver" } | 18 | embassy-net-driver = { version = "0.1.0", path = "../embassy-net-driver" } |
diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml index 1854d2043..fe9514e46 100644 --- a/embassy-net/Cargo.toml +++ b/embassy-net/Cargo.toml | |||
| @@ -43,7 +43,7 @@ smoltcp = { version = "0.9.0", default-features = false, features = [ | |||
| 43 | embassy-net-driver = { version = "0.1.0", path = "../embassy-net-driver" } | 43 | embassy-net-driver = { version = "0.1.0", path = "../embassy-net-driver" } |
| 44 | embassy-hal-common = { version = "0.1.0", path = "../embassy-hal-common" } | 44 | embassy-hal-common = { version = "0.1.0", path = "../embassy-hal-common" } |
| 45 | embassy-time = { version = "0.1.0", path = "../embassy-time" } | 45 | embassy-time = { version = "0.1.0", path = "../embassy-time" } |
| 46 | embassy-sync = { version = "0.1.0", path = "../embassy-sync" } | 46 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } |
| 47 | embedded-io = { version = "0.4.0", optional = true } | 47 | embedded-io = { version = "0.4.0", optional = true } |
| 48 | 48 | ||
| 49 | managed = { version = "0.8.0", default-features = false, features = [ "map" ] } | 49 | managed = { version = "0.8.0", default-features = false, features = [ "map" ] } |
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index 4a4e7c9f9..e5e799d0a 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml | |||
| @@ -80,7 +80,7 @@ _gpio-p1 = [] | |||
| 80 | [dependencies] | 80 | [dependencies] |
| 81 | embassy-executor = { version = "0.1.0", path = "../embassy-executor", optional = true } | 81 | embassy-executor = { version = "0.1.0", path = "../embassy-executor", optional = true } |
| 82 | embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true } | 82 | embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true } |
| 83 | embassy-sync = { version = "0.1.0", path = "../embassy-sync" } | 83 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } |
| 84 | embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-3"]} | 84 | embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-3"]} |
| 85 | embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } | 85 | embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } |
| 86 | embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } | 86 | embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } |
diff --git a/embassy-nrf/src/buffered_uarte.rs b/embassy-nrf/src/buffered_uarte.rs index 75f93f904..c41d8398c 100644 --- a/embassy-nrf/src/buffered_uarte.rs +++ b/embassy-nrf/src/buffered_uarte.rs | |||
| @@ -342,7 +342,7 @@ impl<'d, U: UarteInstance, T: TimerInstance> BufferedUarte<'d, U, T> { | |||
| 342 | r.enable.write(|w| w.enable().enabled()); | 342 | r.enable.write(|w| w.enable().enabled()); |
| 343 | 343 | ||
| 344 | // Configure byte counter. | 344 | // Configure byte counter. |
| 345 | let mut timer = Timer::new_counter(timer); | 345 | let timer = Timer::new_counter(timer); |
| 346 | timer.cc(1).write(rx_buffer.len() as u32 * 2); | 346 | timer.cc(1).write(rx_buffer.len() as u32 * 2); |
| 347 | timer.cc(1).short_compare_clear(); | 347 | timer.cc(1).short_compare_clear(); |
| 348 | timer.clear(); | 348 | timer.clear(); |
diff --git a/embassy-nrf/src/saadc.rs b/embassy-nrf/src/saadc.rs index af952f03d..8aff7df16 100644 --- a/embassy-nrf/src/saadc.rs +++ b/embassy-nrf/src/saadc.rs | |||
| @@ -315,7 +315,7 @@ impl<'d, const N: usize> Saadc<'d, N> { | |||
| 315 | Ppi::new_one_to_one(ppi_ch1, Event::from_reg(&r.events_end), Task::from_reg(&r.tasks_start)); | 315 | Ppi::new_one_to_one(ppi_ch1, Event::from_reg(&r.events_end), Task::from_reg(&r.tasks_start)); |
| 316 | start_ppi.enable(); | 316 | start_ppi.enable(); |
| 317 | 317 | ||
| 318 | let mut timer = Timer::new(timer); | 318 | let timer = Timer::new(timer); |
| 319 | timer.set_frequency(frequency); | 319 | timer.set_frequency(frequency); |
| 320 | timer.cc(0).write(sample_counter); | 320 | timer.cc(0).write(sample_counter); |
| 321 | timer.cc(0).short_compare_clear(); | 321 | timer.cc(0).short_compare_clear(); |
diff --git a/embassy-nrf/src/timer.rs b/embassy-nrf/src/timer.rs index a9487a9fd..e9d2132c1 100644 --- a/embassy-nrf/src/timer.rs +++ b/embassy-nrf/src/timer.rs | |||
| @@ -117,7 +117,7 @@ impl<'d, T: Instance> Timer<'d, T> { | |||
| 117 | 117 | ||
| 118 | let regs = T::regs(); | 118 | let regs = T::regs(); |
| 119 | 119 | ||
| 120 | let mut this = Self { _p: timer }; | 120 | let this = Self { _p: timer }; |
| 121 | 121 | ||
| 122 | // Stop the timer before doing anything else, | 122 | // Stop the timer before doing anything else, |
| 123 | // since changing BITMODE while running can cause 'unpredictable behaviour' according to the specification. | 123 | // since changing BITMODE while running can cause 'unpredictable behaviour' according to the specification. |
| @@ -213,13 +213,13 @@ impl<'d, T: Instance> Timer<'d, T> { | |||
| 213 | /// | 213 | /// |
| 214 | /// # Panics | 214 | /// # Panics |
| 215 | /// Panics if `n` >= the number of CC registers this timer has (4 for a normal timer, 6 for an extended timer). | 215 | /// Panics if `n` >= the number of CC registers this timer has (4 for a normal timer, 6 for an extended timer). |
| 216 | pub fn cc(&mut self, n: usize) -> Cc<T> { | 216 | pub fn cc(&self, n: usize) -> Cc<'d, T> { |
| 217 | if n >= T::CCS { | 217 | if n >= T::CCS { |
| 218 | panic!("Cannot get CC register {} of timer with {} CC registers.", n, T::CCS); | 218 | panic!("Cannot get CC register {} of timer with {} CC registers.", n, T::CCS); |
| 219 | } | 219 | } |
| 220 | Cc { | 220 | Cc { |
| 221 | n, | 221 | n, |
| 222 | _p: self._p.reborrow(), | 222 | _p: unsafe { self._p.clone_unchecked() }, |
| 223 | } | 223 | } |
| 224 | } | 224 | } |
| 225 | } | 225 | } |
diff --git a/embassy-nrf/src/uarte.rs b/embassy-nrf/src/uarte.rs index 3934d1b55..e59b2332a 100644 --- a/embassy-nrf/src/uarte.rs +++ b/embassy-nrf/src/uarte.rs | |||
| @@ -205,7 +205,7 @@ impl<'d, T: Instance> Uarte<'d, T> { | |||
| 205 | ppi_ch1: impl Peripheral<P = impl ConfigurableChannel + 'd> + 'd, | 205 | ppi_ch1: impl Peripheral<P = impl ConfigurableChannel + 'd> + 'd, |
| 206 | ppi_ch2: impl Peripheral<P = impl ConfigurableChannel + 'd> + 'd, | 206 | ppi_ch2: impl Peripheral<P = impl ConfigurableChannel + 'd> + 'd, |
| 207 | ) -> (UarteTx<'d, T>, UarteRxWithIdle<'d, T, U>) { | 207 | ) -> (UarteTx<'d, T>, UarteRxWithIdle<'d, T, U>) { |
| 208 | let mut timer = Timer::new(timer); | 208 | let timer = Timer::new(timer); |
| 209 | 209 | ||
| 210 | into_ref!(ppi_ch1, ppi_ch2); | 210 | into_ref!(ppi_ch1, ppi_ch2); |
| 211 | 211 | ||
diff --git a/embassy-nrf/src/usb/mod.rs b/embassy-nrf/src/usb/mod.rs index 56de511df..c1f3f48cb 100644 --- a/embassy-nrf/src/usb/mod.rs +++ b/embassy-nrf/src/usb/mod.rs | |||
| @@ -153,7 +153,7 @@ impl<'d, T: Instance, V: VbusDetect + 'd> driver::Driver<'d> for Driver<'d, T, V | |||
| 153 | })) | 153 | })) |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | fn start(mut self, control_max_packet_size: u16) -> (Self::Bus, Self::ControlPipe) { | 156 | fn start(self, control_max_packet_size: u16) -> (Self::Bus, Self::ControlPipe) { |
| 157 | ( | 157 | ( |
| 158 | Bus { | 158 | Bus { |
| 159 | _p: unsafe { self._p.clone_unchecked() }, | 159 | _p: unsafe { self._p.clone_unchecked() }, |
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index cb9c7be77..2ef2c8f07 100644 --- a/embassy-rp/Cargo.toml +++ b/embassy-rp/Cargo.toml | |||
| @@ -39,7 +39,7 @@ nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", " | |||
| 39 | unstable-traits = ["embedded-hal-1", "embedded-hal-nb"] | 39 | unstable-traits = ["embedded-hal-1", "embedded-hal-nb"] |
| 40 | 40 | ||
| 41 | [dependencies] | 41 | [dependencies] |
| 42 | embassy-sync = { version = "0.1.0", path = "../embassy-sync" } | 42 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } |
| 43 | embassy-executor = { version = "0.1.0", path = "../embassy-executor" } | 43 | embassy-executor = { version = "0.1.0", path = "../embassy-executor" } |
| 44 | embassy-time = { version = "0.1.0", path = "../embassy-time", features = [ "tick-hz-1_000_000" ] } | 44 | embassy-time = { version = "0.1.0", path = "../embassy-time", features = [ "tick-hz-1_000_000" ] } |
| 45 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 45 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index a8ebacd25..969dc3b70 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml | |||
| @@ -31,7 +31,7 @@ flavors = [ | |||
| 31 | ] | 31 | ] |
| 32 | 32 | ||
| 33 | [dependencies] | 33 | [dependencies] |
| 34 | embassy-sync = { version = "0.1.0", path = "../embassy-sync" } | 34 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } |
| 35 | embassy-executor = { version = "0.1.0", path = "../embassy-executor" } | 35 | embassy-executor = { version = "0.1.0", path = "../embassy-executor" } |
| 36 | embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true } | 36 | embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true } |
| 37 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 37 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| @@ -58,7 +58,7 @@ sdio-host = "0.5.0" | |||
| 58 | embedded-sdmmc = { git = "https://github.com/embassy-rs/embedded-sdmmc-rs", rev = "46d1b1c2ff13e31e282ec1e352421721694f126a", optional = true } | 58 | embedded-sdmmc = { git = "https://github.com/embassy-rs/embedded-sdmmc-rs", rev = "46d1b1c2ff13e31e282ec1e352421721694f126a", optional = true } |
| 59 | critical-section = "1.1" | 59 | critical-section = "1.1" |
| 60 | atomic-polyfill = "1.0.1" | 60 | atomic-polyfill = "1.0.1" |
| 61 | stm32-metapac = "5" | 61 | stm32-metapac = "6" |
| 62 | vcell = "0.1.3" | 62 | vcell = "0.1.3" |
| 63 | bxcan = "0.7.0" | 63 | bxcan = "0.7.0" |
| 64 | nb = "1.0.0" | 64 | nb = "1.0.0" |
| @@ -73,7 +73,7 @@ critical-section = { version = "1.1", features = ["std"] } | |||
| 73 | [build-dependencies] | 73 | [build-dependencies] |
| 74 | proc-macro2 = "1.0.36" | 74 | proc-macro2 = "1.0.36" |
| 75 | quote = "1.0.15" | 75 | quote = "1.0.15" |
| 76 | stm32-metapac = { version = "5", default-features = false, features = ["metadata"]} | 76 | stm32-metapac = { version = "6", default-features = false, features = ["metadata"]} |
| 77 | 77 | ||
| 78 | [features] | 78 | [features] |
| 79 | default = ["stm32-metapac/rt"] | 79 | default = ["stm32-metapac/rt"] |
diff --git a/embassy-stm32/build.rs b/embassy-stm32/build.rs index b01e8ba45..73bd29fcf 100644 --- a/embassy-stm32/build.rs +++ b/embassy-stm32/build.rs | |||
| @@ -180,7 +180,7 @@ fn main() { | |||
| 180 | 180 | ||
| 181 | #[cfg(flash)] | 181 | #[cfg(flash)] |
| 182 | impl<'d> FlashLayout<'d> { | 182 | impl<'d> FlashLayout<'d> { |
| 183 | pub(crate) fn new(mut p: embassy_hal_common::PeripheralRef<'d, crate::peripherals::FLASH>) -> Self { | 183 | pub(crate) fn new(p: embassy_hal_common::PeripheralRef<'d, crate::peripherals::FLASH>) -> Self { |
| 184 | Self { | 184 | Self { |
| 185 | #(#inits),* | 185 | #(#inits),* |
| 186 | } | 186 | } |
diff --git a/embassy-stm32/src/flash/common.rs b/embassy-stm32/src/flash/common.rs index 8235d6f08..1189e447e 100644 --- a/embassy-stm32/src/flash/common.rs +++ b/embassy-stm32/src/flash/common.rs | |||
| @@ -33,8 +33,7 @@ impl<'d> Flash<'d> { | |||
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | pub(crate) fn release(self) -> PeripheralRef<'d, crate::peripherals::FLASH> { | 35 | pub(crate) fn release(self) -> PeripheralRef<'d, crate::peripherals::FLASH> { |
| 36 | let mut flash = self; | 36 | unsafe { self.inner.clone_unchecked() } |
| 37 | unsafe { flash.inner.clone_unchecked() } | ||
| 38 | } | 37 | } |
| 39 | } | 38 | } |
| 40 | 39 | ||
diff --git a/embassy-stm32/src/flash/f4.rs b/embassy-stm32/src/flash/f4.rs index 2ce9df69f..60ac62c17 100644 --- a/embassy-stm32/src/flash/f4.rs +++ b/embassy-stm32/src/flash/f4.rs | |||
| @@ -67,7 +67,7 @@ mod alt_regions { | |||
| 67 | 67 | ||
| 68 | // SAFETY: We never expose the cloned peripheral references, and their instance is not public. | 68 | // SAFETY: We never expose the cloned peripheral references, and their instance is not public. |
| 69 | // Also, all flash region operations are protected with a cs. | 69 | // Also, all flash region operations are protected with a cs. |
| 70 | let mut p = self.release(); | 70 | let p = self.release(); |
| 71 | AltFlashLayout { | 71 | AltFlashLayout { |
| 72 | bank1_region1: Bank1Region1(&BANK1_REGION1, unsafe { p.clone_unchecked() }), | 72 | bank1_region1: Bank1Region1(&BANK1_REGION1, unsafe { p.clone_unchecked() }), |
| 73 | bank1_region2: Bank1Region2(&BANK1_REGION2, unsafe { p.clone_unchecked() }), | 73 | bank1_region2: Bank1Region2(&BANK1_REGION2, unsafe { p.clone_unchecked() }), |
diff --git a/embassy-stm32/src/gpio.rs b/embassy-stm32/src/gpio.rs index 3024f1ffa..4895684e0 100644 --- a/embassy-stm32/src/gpio.rs +++ b/embassy-stm32/src/gpio.rs | |||
| @@ -29,7 +29,7 @@ impl<'d, T: Pin> Flex<'d, T> { | |||
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | #[inline] | 31 | #[inline] |
| 32 | pub fn degrade(mut self) -> Flex<'d, AnyPin> { | 32 | pub fn degrade(self) -> Flex<'d, AnyPin> { |
| 33 | // Safety: We are about to drop the other copy of this pin, so | 33 | // Safety: We are about to drop the other copy of this pin, so |
| 34 | // this clone is safe. | 34 | // this clone is safe. |
| 35 | let pin = unsafe { self.pin.clone_unchecked() }; | 35 | let pin = unsafe { self.pin.clone_unchecked() }; |
diff --git a/embassy-stm32/src/rcc/f2.rs b/embassy-stm32/src/rcc/f2.rs index d543888c1..bcae64d0f 100644 --- a/embassy-stm32/src/rcc/f2.rs +++ b/embassy-stm32/src/rcc/f2.rs | |||
| @@ -148,7 +148,7 @@ impl Into<Pllp> for PLLMainDiv { | |||
| 148 | match self { | 148 | match self { |
| 149 | PLLMainDiv::Div2 => Pllp::DIV2, | 149 | PLLMainDiv::Div2 => Pllp::DIV2, |
| 150 | PLLMainDiv::Div4 => Pllp::DIV4, | 150 | PLLMainDiv::Div4 => Pllp::DIV4, |
| 151 | PLLMainDiv::Div6 => Pllp::DIV8, | 151 | PLLMainDiv::Div6 => Pllp::DIV6, |
| 152 | PLLMainDiv::Div8 => Pllp::DIV8, | 152 | PLLMainDiv::Div8 => Pllp::DIV8, |
| 153 | } | 153 | } |
| 154 | } | 154 | } |
diff --git a/embassy-stm32/src/time.rs b/embassy-stm32/src/time.rs index f08abe331..604503e61 100644 --- a/embassy-stm32/src/time.rs +++ b/embassy-stm32/src/time.rs | |||
| @@ -8,31 +8,31 @@ use core::ops::{Div, Mul}; | |||
| 8 | pub struct Hertz(pub u32); | 8 | pub struct Hertz(pub u32); |
| 9 | 9 | ||
| 10 | impl Hertz { | 10 | impl Hertz { |
| 11 | pub fn hz(hertz: u32) -> Self { | 11 | pub const fn hz(hertz: u32) -> Self { |
| 12 | Self(hertz) | 12 | Self(hertz) |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | pub fn khz(kilohertz: u32) -> Self { | 15 | pub const fn khz(kilohertz: u32) -> Self { |
| 16 | Self(kilohertz * 1_000) | 16 | Self(kilohertz * 1_000) |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | pub fn mhz(megahertz: u32) -> Self { | 19 | pub const fn mhz(megahertz: u32) -> Self { |
| 20 | Self(megahertz * 1_000_000) | 20 | Self(megahertz * 1_000_000) |
| 21 | } | 21 | } |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | /// This is a convenience shortcut for [`Hertz::hz`] | 24 | /// This is a convenience shortcut for [`Hertz::hz`] |
| 25 | pub fn hz(hertz: u32) -> Hertz { | 25 | pub const fn hz(hertz: u32) -> Hertz { |
| 26 | Hertz::hz(hertz) | 26 | Hertz::hz(hertz) |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | /// This is a convenience shortcut for [`Hertz::khz`] | 29 | /// This is a convenience shortcut for [`Hertz::khz`] |
| 30 | pub fn khz(kilohertz: u32) -> Hertz { | 30 | pub const fn khz(kilohertz: u32) -> Hertz { |
| 31 | Hertz::khz(kilohertz) | 31 | Hertz::khz(kilohertz) |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | /// This is a convenience shortcut for [`Hertz::mhz`] | 34 | /// This is a convenience shortcut for [`Hertz::mhz`] |
| 35 | pub fn mhz(megahertz: u32) -> Hertz { | 35 | pub const fn mhz(megahertz: u32) -> Hertz { |
| 36 | Hertz::mhz(megahertz) | 36 | Hertz::mhz(megahertz) |
| 37 | } | 37 | } |
| 38 | 38 | ||
diff --git a/embassy-sync/CHANGELOG.md b/embassy-sync/CHANGELOG.md new file mode 100644 index 000000000..a60f3f7c4 --- /dev/null +++ b/embassy-sync/CHANGELOG.md | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | # Changelog | ||
| 2 | |||
| 3 | All notable changes to this project will be documented in this file. | ||
| 4 | |||
| 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
| 7 | |||
| 8 | ## 0.2.0 - 2023-04-13 | ||
| 9 | |||
| 10 | - pubsub: Fix messages not getting popped when the last subscriber that needed them gets dropped. | ||
| 11 | - pubsub: Move instead of clone messages when the last subscriber pops them. | ||
| 12 | - pubsub: Pop messages which count is 0 after unsubscribe. | ||
| 13 | - Update `embedded-io` from `0.3` to `0.4` (uses `async fn` in traits). | ||
| 14 | - impl `Default` for `WakerRegistration` | ||
| 15 | - impl `Default` for `Signal` | ||
| 16 | - Remove unnecessary uses of `atomic-polyfill` | ||
| 17 | - Add `#[must_use]` to all futures. | ||
| 18 | |||
| 19 | |||
| 20 | ## 0.1.0 - 2022-08-26 | ||
| 21 | |||
| 22 | - First release \ No newline at end of file | ||
diff --git a/embassy-sync/Cargo.toml b/embassy-sync/Cargo.toml index e4871e718..bc06b92cd 100644 --- a/embassy-sync/Cargo.toml +++ b/embassy-sync/Cargo.toml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | name = "embassy-sync" | 2 | name = "embassy-sync" |
| 3 | version = "0.1.0" | 3 | version = "0.2.0" |
| 4 | edition = "2021" | 4 | edition = "2021" |
| 5 | description = "no-std, no-alloc synchronization primitives with async support" | 5 | description = "no-std, no-alloc synchronization primitives with async support" |
| 6 | repository = "https://github.com/embassy-rs/embassy" | 6 | repository = "https://github.com/embassy-rs/embassy" |
diff --git a/embassy-time/CHANGELOG.md b/embassy-time/CHANGELOG.md new file mode 100644 index 000000000..f4a7860e6 --- /dev/null +++ b/embassy-time/CHANGELOG.md | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | # Changelog | ||
| 2 | |||
| 3 | All notable changes to this project will be documented in this file. | ||
| 4 | |||
| 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
| 7 | |||
| 8 | ## 0.1.1 - 2023-04-13 | ||
| 9 | |||
| 10 | - Update `embedded-hal-async` to `0.2.0-alpha.1` (uses `async fn` in traits). | ||
| 11 | - Update `embedded-hal v1` to `1.0.0-alpha.10`. (Note: v0.2 support is kept unchanged). | ||
| 12 | - Remove dep on `embassy-sync`. | ||
| 13 | - Fix reentrancy issues in the `std` time driver (#1177) | ||
| 14 | - Add `Duration::from_hz()`. | ||
| 15 | - impl `From` conversions to/from `core::time::Duration`. | ||
| 16 | - Add `#[must_use]` to all futures. | ||
| 17 | - Add inherent `async fn tick()` to `Ticker`, so you can use it directly without the `Stream` trait. | ||
| 18 | - Add more tick rates. | ||
| 19 | - impl `Default` for `Signal` | ||
| 20 | - Remove unnecessary uses of `atomic-polyfill` | ||
| 21 | |||
| 22 | ## 0.1.0 - 2022-08-26 | ||
| 23 | |||
| 24 | - First release \ No newline at end of file | ||
diff --git a/embassy-time/Cargo.toml b/embassy-time/Cargo.toml index 38d31f1c4..c4edbd38a 100644 --- a/embassy-time/Cargo.toml +++ b/embassy-time/Cargo.toml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | name = "embassy-time" | 2 | name = "embassy-time" |
| 3 | version = "0.1.0" | 3 | version = "0.1.1" |
| 4 | edition = "2021" | 4 | edition = "2021" |
| 5 | description = "Instant and Duration for embedded no-std systems, with async timer support" | 5 | description = "Instant and Duration for embedded no-std systems, with async timer support" |
| 6 | repository = "https://github.com/embassy-rs/embassy" | 6 | repository = "https://github.com/embassy-rs/embassy" |
| @@ -156,7 +156,6 @@ embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.10", option | |||
| 156 | embedded-hal-async = { version = "=0.2.0-alpha.1", optional = true} | 156 | embedded-hal-async = { version = "=0.2.0-alpha.1", optional = true} |
| 157 | 157 | ||
| 158 | futures-util = { version = "0.3.17", default-features = false } | 158 | futures-util = { version = "0.3.17", default-features = false } |
| 159 | embassy-sync = { version = "0.1", path = "../embassy-sync" } | ||
| 160 | atomic-polyfill = "1.0.1" | 159 | atomic-polyfill = "1.0.1" |
| 161 | critical-section = "1.1" | 160 | critical-section = "1.1" |
| 162 | cfg-if = "1.0.0" | 161 | cfg-if = "1.0.0" |
diff --git a/embassy-time/src/driver_std.rs b/embassy-time/src/driver_std.rs index da46a599d..9f8c57b5c 100644 --- a/embassy-time/src/driver_std.rs +++ b/embassy-time/src/driver_std.rs | |||
| @@ -5,8 +5,7 @@ use std::time::{Duration as StdDuration, Instant as StdInstant}; | |||
| 5 | use std::{mem, ptr, thread}; | 5 | use std::{mem, ptr, thread}; |
| 6 | 6 | ||
| 7 | use atomic_polyfill::{AtomicU8, Ordering}; | 7 | use atomic_polyfill::{AtomicU8, Ordering}; |
| 8 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | 8 | use critical_section::Mutex as CsMutex; |
| 9 | use embassy_sync::blocking_mutex::Mutex as EmbassyMutex; | ||
| 10 | 9 | ||
| 11 | use crate::driver::{AlarmHandle, Driver}; | 10 | use crate::driver::{AlarmHandle, Driver}; |
| 12 | 11 | ||
| @@ -40,7 +39,7 @@ struct TimeDriver { | |||
| 40 | // The STD Driver implementation requires the alarms' mutex to be reentrant, which the STD Mutex isn't | 39 | // The STD Driver implementation requires the alarms' mutex to be reentrant, which the STD Mutex isn't |
| 41 | // Fortunately, mutexes based on the `critical-section` crate are reentrant, because the critical sections | 40 | // Fortunately, mutexes based on the `critical-section` crate are reentrant, because the critical sections |
| 42 | // themselves are reentrant | 41 | // themselves are reentrant |
| 43 | alarms: UninitCell<EmbassyMutex<CriticalSectionRawMutex, RefCell<[AlarmState; ALARM_COUNT]>>>, | 42 | alarms: UninitCell<CsMutex<RefCell<[AlarmState; ALARM_COUNT]>>>, |
| 44 | zero_instant: UninitCell<StdInstant>, | 43 | zero_instant: UninitCell<StdInstant>, |
| 45 | signaler: UninitCell<Signaler>, | 44 | signaler: UninitCell<Signaler>, |
| 46 | } | 45 | } |
| @@ -58,8 +57,7 @@ crate::time_driver_impl!(static DRIVER: TimeDriver = TimeDriver { | |||
| 58 | impl TimeDriver { | 57 | impl TimeDriver { |
| 59 | fn init(&self) { | 58 | fn init(&self) { |
| 60 | self.once.call_once(|| unsafe { | 59 | self.once.call_once(|| unsafe { |
| 61 | self.alarms | 60 | self.alarms.write(CsMutex::new(RefCell::new([ALARM_NEW; ALARM_COUNT]))); |
| 62 | .write(EmbassyMutex::new(RefCell::new([ALARM_NEW; ALARM_COUNT]))); | ||
| 63 | self.zero_instant.write(StdInstant::now()); | 61 | self.zero_instant.write(StdInstant::now()); |
| 64 | self.signaler.write(Signaler::new()); | 62 | self.signaler.write(Signaler::new()); |
| 65 | 63 | ||
| @@ -72,7 +70,8 @@ impl TimeDriver { | |||
| 72 | loop { | 70 | loop { |
| 73 | let now = DRIVER.now(); | 71 | let now = DRIVER.now(); |
| 74 | 72 | ||
| 75 | let next_alarm = unsafe { DRIVER.alarms.as_ref() }.lock(|alarms| { | 73 | let next_alarm = critical_section::with(|cs| { |
| 74 | let alarms = unsafe { DRIVER.alarms.as_ref() }.borrow(cs); | ||
| 76 | loop { | 75 | loop { |
| 77 | let pending = alarms | 76 | let pending = alarms |
| 78 | .borrow_mut() | 77 | .borrow_mut() |
| @@ -139,8 +138,8 @@ impl Driver for TimeDriver { | |||
| 139 | 138 | ||
| 140 | fn set_alarm_callback(&self, alarm: AlarmHandle, callback: fn(*mut ()), ctx: *mut ()) { | 139 | fn set_alarm_callback(&self, alarm: AlarmHandle, callback: fn(*mut ()), ctx: *mut ()) { |
| 141 | self.init(); | 140 | self.init(); |
| 142 | unsafe { self.alarms.as_ref() }.lock(|alarms| { | 141 | critical_section::with(|cs| { |
| 143 | let mut alarms = alarms.borrow_mut(); | 142 | let mut alarms = unsafe { self.alarms.as_ref() }.borrow_ref_mut(cs); |
| 144 | let alarm = &mut alarms[alarm.id() as usize]; | 143 | let alarm = &mut alarms[alarm.id() as usize]; |
| 145 | alarm.callback = callback as *const (); | 144 | alarm.callback = callback as *const (); |
| 146 | alarm.ctx = ctx; | 145 | alarm.ctx = ctx; |
| @@ -149,9 +148,8 @@ impl Driver for TimeDriver { | |||
| 149 | 148 | ||
| 150 | fn set_alarm(&self, alarm: AlarmHandle, timestamp: u64) -> bool { | 149 | fn set_alarm(&self, alarm: AlarmHandle, timestamp: u64) -> bool { |
| 151 | self.init(); | 150 | self.init(); |
| 152 | unsafe { self.alarms.as_ref() }.lock(|alarms| { | 151 | critical_section::with(|cs| { |
| 153 | let mut alarms = alarms.borrow_mut(); | 152 | let mut alarms = unsafe { self.alarms.as_ref() }.borrow_ref_mut(cs); |
| 154 | |||
| 155 | let alarm = &mut alarms[alarm.id() as usize]; | 153 | let alarm = &mut alarms[alarm.id() as usize]; |
| 156 | alarm.timestamp = timestamp; | 154 | alarm.timestamp = timestamp; |
| 157 | unsafe { self.signaler.as_ref() }.signal(); | 155 | unsafe { self.signaler.as_ref() }.signal(); |
diff --git a/embassy-time/src/queue_generic.rs b/embassy-time/src/queue_generic.rs index 20ae7e6cc..0f67d9dbb 100644 --- a/embassy-time/src/queue_generic.rs +++ b/embassy-time/src/queue_generic.rs | |||
| @@ -2,8 +2,7 @@ use core::cell::RefCell; | |||
| 2 | use core::cmp::{min, Ordering}; | 2 | use core::cmp::{min, Ordering}; |
| 3 | use core::task::Waker; | 3 | use core::task::Waker; |
| 4 | 4 | ||
| 5 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | 5 | use critical_section::Mutex; |
| 6 | use embassy_sync::blocking_mutex::Mutex; | ||
| 7 | use heapless::Vec; | 6 | use heapless::Vec; |
| 8 | 7 | ||
| 9 | use crate::driver::{allocate_alarm, set_alarm, set_alarm_callback, AlarmHandle}; | 8 | use crate::driver::{allocate_alarm, set_alarm, set_alarm_callback, AlarmHandle}; |
| @@ -129,7 +128,7 @@ impl InnerQueue { | |||
| 129 | } | 128 | } |
| 130 | 129 | ||
| 131 | struct Queue { | 130 | struct Queue { |
| 132 | inner: Mutex<CriticalSectionRawMutex, RefCell<Option<InnerQueue>>>, | 131 | inner: Mutex<RefCell<Option<InnerQueue>>>, |
| 133 | } | 132 | } |
| 134 | 133 | ||
| 135 | impl Queue { | 134 | impl Queue { |
| @@ -140,8 +139,8 @@ impl Queue { | |||
| 140 | } | 139 | } |
| 141 | 140 | ||
| 142 | fn schedule_wake(&'static self, at: Instant, waker: &Waker) { | 141 | fn schedule_wake(&'static self, at: Instant, waker: &Waker) { |
| 143 | self.inner.lock(|inner| { | 142 | critical_section::with(|cs| { |
| 144 | let mut inner = inner.borrow_mut(); | 143 | let mut inner = self.inner.borrow_ref_mut(cs); |
| 145 | 144 | ||
| 146 | if inner.is_none() {} | 145 | if inner.is_none() {} |
| 147 | 146 | ||
| @@ -159,8 +158,7 @@ impl Queue { | |||
| 159 | } | 158 | } |
| 160 | 159 | ||
| 161 | fn handle_alarm(&self) { | 160 | fn handle_alarm(&self) { |
| 162 | self.inner | 161 | critical_section::with(|cs| self.inner.borrow_ref_mut(cs).as_mut().unwrap().handle_alarm()) |
| 163 | .lock(|inner| inner.borrow_mut().as_mut().unwrap().handle_alarm()); | ||
| 164 | } | 162 | } |
| 165 | 163 | ||
| 166 | fn handle_alarm_callback(ctx: *mut ()) { | 164 | fn handle_alarm_callback(ctx: *mut ()) { |
diff --git a/embassy-usb-logger/Cargo.toml b/embassy-usb-logger/Cargo.toml index 18d70b0c5..0f91cd36d 100644 --- a/embassy-usb-logger/Cargo.toml +++ b/embassy-usb-logger/Cargo.toml | |||
| @@ -10,7 +10,7 @@ target = "thumbv7em-none-eabi" | |||
| 10 | 10 | ||
| 11 | [dependencies] | 11 | [dependencies] |
| 12 | embassy-usb = { version = "0.1.0", path = "../embassy-usb" } | 12 | embassy-usb = { version = "0.1.0", path = "../embassy-usb" } |
| 13 | embassy-sync = { version = "0.1.0", path = "../embassy-sync" } | 13 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } |
| 14 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| 15 | futures = { version = "0.3", default-features = false } | 15 | futures = { version = "0.3", default-features = false } |
| 16 | static_cell = "1" | 16 | static_cell = "1" |
diff --git a/embassy-usb/Cargo.toml b/embassy-usb/Cargo.toml index ae3f3ac37..03cf96a1d 100644 --- a/embassy-usb/Cargo.toml +++ b/embassy-usb/Cargo.toml | |||
| @@ -41,7 +41,7 @@ max-handler-count-8 = [] | |||
| 41 | [dependencies] | 41 | [dependencies] |
| 42 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 42 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| 43 | embassy-usb-driver = { version = "0.1.0", path = "../embassy-usb-driver" } | 43 | embassy-usb-driver = { version = "0.1.0", path = "../embassy-usb-driver" } |
| 44 | embassy-sync = { version = "0.1.0", path = "../embassy-sync" } | 44 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } |
| 45 | embassy-net-driver-channel = { version = "0.1.0", path = "../embassy-net-driver-channel" } | 45 | embassy-net-driver-channel = { version = "0.1.0", path = "../embassy-net-driver-channel" } |
| 46 | 46 | ||
| 47 | defmt = { version = "0.3", optional = true } | 47 | defmt = { version = "0.3", optional = true } |
diff --git a/examples/boot/application/nrf/Cargo.toml b/examples/boot/application/nrf/Cargo.toml index e75c73cbd..cda1917b3 100644 --- a/examples/boot/application/nrf/Cargo.toml +++ b/examples/boot/application/nrf/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync" } | 8 | embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync" } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly"] } | 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly"] } |
| 11 | embassy-nrf = { version = "0.1.0", path = "../../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", "nightly"] } | 11 | embassy-nrf = { version = "0.1.0", path = "../../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", "nightly"] } |
diff --git a/examples/boot/application/rp/Cargo.toml b/examples/boot/application/rp/Cargo.toml index 8de2d2ebd..9d34a3691 100644 --- a/examples/boot/application/rp/Cargo.toml +++ b/examples/boot/application/rp/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync" } | 8 | embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync" } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly"] } | 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly"] } |
| 11 | embassy-rp = { version = "0.1.0", path = "../../../../embassy-rp", features = ["time-driver", "unstable-traits", "nightly"] } | 11 | embassy-rp = { version = "0.1.0", path = "../../../../embassy-rp", features = ["time-driver", "unstable-traits", "nightly"] } |
diff --git a/examples/boot/application/stm32f3/Cargo.toml b/examples/boot/application/stm32f3/Cargo.toml index 083607de5..8e978eb24 100644 --- a/examples/boot/application/stm32f3/Cargo.toml +++ b/examples/boot/application/stm32f3/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f303re", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f303re", "time-driver-any", "exti"] } |
diff --git a/examples/boot/application/stm32f7/Cargo.toml b/examples/boot/application/stm32f7/Cargo.toml index 74f508515..fb55b166d 100644 --- a/examples/boot/application/stm32f7/Cargo.toml +++ b/examples/boot/application/stm32f7/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f767zi", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f767zi", "time-driver-any", "exti"] } |
diff --git a/examples/boot/application/stm32h7/Cargo.toml b/examples/boot/application/stm32h7/Cargo.toml index 898b9a47e..ea6b905a4 100644 --- a/examples/boot/application/stm32h7/Cargo.toml +++ b/examples/boot/application/stm32h7/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync" } | 8 | embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync" } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32h743zi", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32h743zi", "time-driver-any", "exti"] } |
diff --git a/examples/boot/application/stm32l0/Cargo.toml b/examples/boot/application/stm32l0/Cargo.toml index e142c8481..6ba18564d 100644 --- a/examples/boot/application/stm32l0/Cargo.toml +++ b/examples/boot/application/stm32l0/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l072cz", "time-driver-any", "exti", "memory-x"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l072cz", "time-driver-any", "exti", "memory-x"] } |
diff --git a/examples/boot/application/stm32l1/Cargo.toml b/examples/boot/application/stm32l1/Cargo.toml index f0e92e1ac..d5b8e3e01 100644 --- a/examples/boot/application/stm32l1/Cargo.toml +++ b/examples/boot/application/stm32l1/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l151cb-a", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l151cb-a", "time-driver-any", "exti"] } |
diff --git a/examples/boot/application/stm32l4/Cargo.toml b/examples/boot/application/stm32l4/Cargo.toml index 87689e9a9..ccd1fe2ee 100644 --- a/examples/boot/application/stm32l4/Cargo.toml +++ b/examples/boot/application/stm32l4/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l475vg", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l475vg", "time-driver-any", "exti"] } |
diff --git a/examples/boot/application/stm32wl/Cargo.toml b/examples/boot/application/stm32wl/Cargo.toml index a6708bf51..128afd51e 100644 --- a/examples/boot/application/stm32wl/Cargo.toml +++ b/examples/boot/application/stm32wl/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32wl55jc-cm4", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32wl55jc-cm4", "time-driver-any", "exti"] } |
diff --git a/examples/nrf-rtos-trace/Cargo.toml b/examples/nrf-rtos-trace/Cargo.toml index 7910b372a..6f7cb8875 100644 --- a/examples/nrf-rtos-trace/Cargo.toml +++ b/examples/nrf-rtos-trace/Cargo.toml | |||
| @@ -16,7 +16,7 @@ log = [ | |||
| 16 | ] | 16 | ] |
| 17 | 17 | ||
| 18 | [dependencies] | 18 | [dependencies] |
| 19 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync" } | 19 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync" } |
| 20 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "rtos-trace", "rtos-trace-interrupt", "integrated-timers"] } | 20 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "rtos-trace", "rtos-trace-interrupt", "integrated-timers"] } |
| 21 | embassy-time = { version = "0.1.0", path = "../../embassy-time" } | 21 | embassy-time = { version = "0.1.0", path = "../../embassy-time" } |
| 22 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } | 22 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } |
diff --git a/examples/nrf52840/Cargo.toml b/examples/nrf52840/Cargo.toml index 3ece24066..fc614cb80 100644 --- a/examples/nrf52840/Cargo.toml +++ b/examples/nrf52840/Cargo.toml | |||
| @@ -11,7 +11,7 @@ nightly = ["embassy-executor/nightly", "embassy-nrf/nightly", "embassy-net/night | |||
| 11 | 11 | ||
| 12 | [dependencies] | 12 | [dependencies] |
| 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 14 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 14 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 15 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | 15 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } |
| 16 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 16 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 17 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 17 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } |
diff --git a/examples/nrf5340/Cargo.toml b/examples/nrf5340/Cargo.toml index 4134db46f..2c3a12964 100644 --- a/examples/nrf5340/Cargo.toml +++ b/examples/nrf5340/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 8 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 9 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = [ | 9 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = [ |
| 10 | "defmt", | 10 | "defmt", |
| 11 | ] } | 11 | ] } |
| 12 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", | 12 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", |
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml index 63d0ac82a..f0fd27991 100644 --- a/examples/rp/Cargo.toml +++ b/examples/rp/Cargo.toml | |||
| @@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0" | |||
| 7 | 7 | ||
| 8 | [dependencies] | 8 | [dependencies] |
| 9 | embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal", features = ["defmt"] } | 9 | embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal", features = ["defmt"] } |
| 10 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 11 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 12 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 12 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 13 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver", "pio", "critical-section-impl"] } | 13 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver", "pio", "critical-section-impl"] } |
diff --git a/examples/std/Cargo.toml b/examples/std/Cargo.toml index ff08e378c..9938c693a 100644 --- a/examples/std/Cargo.toml +++ b/examples/std/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["log"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["log"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-std", "executor-thread", "log", "nightly", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-std", "executor-thread", "log", "nightly", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["log", "std", "nightly"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["log", "std", "nightly"] } |
| 11 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features=[ "std", "nightly", "log", "medium-ethernet", "tcp", "udp", "dns", "dhcpv4", "unstable-traits", "proto-ipv6"] } | 11 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features=[ "std", "nightly", "log", "medium-ethernet", "tcp", "udp", "dns", "dhcpv4", "unstable-traits", "proto-ipv6"] } |
diff --git a/examples/stm32c0/Cargo.toml b/examples/stm32c0/Cargo.toml index 3b1d888f6..5667200e3 100644 --- a/examples/stm32c0/Cargo.toml +++ b/examples/stm32c0/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32c031c6", "memory-x", "unstable-pac", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32c031c6", "memory-x", "unstable-pac", "exti"] } |
diff --git a/examples/stm32f0/Cargo.toml b/examples/stm32f0/Cargo.toml index 5c82c5579..2ff252622 100644 --- a/examples/stm32f0/Cargo.toml +++ b/examples/stm32f0/Cargo.toml | |||
| @@ -12,7 +12,7 @@ cortex-m-rt = "0.7.0" | |||
| 12 | defmt = "0.3" | 12 | defmt = "0.3" |
| 13 | defmt-rtt = "0.4" | 13 | defmt-rtt = "0.4" |
| 14 | panic-probe = "0.3" | 14 | panic-probe = "0.3" |
| 15 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 15 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 16 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | 16 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } |
| 17 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 17 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 18 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "memory-x", "stm32f091rc", "time-driver-any", "exti", "unstable-pac"] } | 18 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "memory-x", "stm32f091rc", "time-driver-any", "exti", "unstable-pac"] } |
diff --git a/examples/stm32f1/Cargo.toml b/examples/stm32f1/Cargo.toml index 99f37cdda..d08e00b0b 100644 --- a/examples/stm32f1/Cargo.toml +++ b/examples/stm32f1/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-any", "unstable-traits" ] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-any", "unstable-traits" ] } |
diff --git a/examples/stm32f2/Cargo.toml b/examples/stm32f2/Cargo.toml index ffb232310..02045a79f 100644 --- a/examples/stm32f2/Cargo.toml +++ b/examples/stm32f2/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f207zg", "unstable-pac", "memory-x", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f207zg", "unstable-pac", "memory-x", "time-driver-any", "exti"] } |
diff --git a/examples/stm32f3/Cargo.toml b/examples/stm32f3/Cargo.toml index 38f11201d..a62eba9ec 100644 --- a/examples/stm32f3/Cargo.toml +++ b/examples/stm32f3/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f303ze", "unstable-pac", "memory-x", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f303ze", "unstable-pac", "memory-x", "time-driver-any", "exti"] } |
diff --git a/examples/stm32f4/Cargo.toml b/examples/stm32f4/Cargo.toml index d967d8501..4b2f3d21c 100644 --- a/examples/stm32f4/Cargo.toml +++ b/examples/stm32f4/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers", "arch-cortex-m", "executor-thread", "executor-interrupt"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers", "arch-cortex-m", "executor-thread", "executor-interrupt"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "unstable-traits", "defmt", "stm32f429zi", "unstable-pac", "memory-x", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "unstable-traits", "defmt", "stm32f429zi", "unstable-pac", "memory-x", "time-driver-any", "exti"] } |
diff --git a/examples/stm32f7/Cargo.toml b/examples/stm32f7/Cargo.toml index 74e7bf53d..898e05c12 100644 --- a/examples/stm32f7/Cargo.toml +++ b/examples/stm32f7/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f767zi", "unstable-pac", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f767zi", "unstable-pac", "time-driver-any", "exti"] } |
diff --git a/examples/stm32g0/Cargo.toml b/examples/stm32g0/Cargo.toml index 03bdbcea3..a522fb422 100644 --- a/examples/stm32g0/Cargo.toml +++ b/examples/stm32g0/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g071rb", "memory-x", "unstable-pac", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g071rb", "memory-x", "unstable-pac", "exti"] } |
diff --git a/examples/stm32g4/Cargo.toml b/examples/stm32g4/Cargo.toml index 4e4150350..b275eb190 100644 --- a/examples/stm32g4/Cargo.toml +++ b/examples/stm32g4/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g491re", "memory-x", "unstable-pac", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g491re", "memory-x", "unstable-pac", "exti"] } |
diff --git a/examples/stm32h5/Cargo.toml b/examples/stm32h5/Cargo.toml index b77d376ca..149f8a58b 100644 --- a/examples/stm32h5/Cargo.toml +++ b/examples/stm32h5/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h563zi", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h563zi", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } |
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml index 154f5a987..8316498ca 100644 --- a/examples/stm32h7/Cargo.toml +++ b/examples/stm32h7/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h743bi", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h743bi", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } |
diff --git a/examples/stm32l0/Cargo.toml b/examples/stm32l0/Cargo.toml index 413d5c18f..d446d41b2 100644 --- a/examples/stm32l0/Cargo.toml +++ b/examples/stm32l0/Cargo.toml | |||
| @@ -9,7 +9,7 @@ default = ["nightly"] | |||
| 9 | nightly = ["embassy-stm32/nightly", "embassy-lora", "lorawan-device", "lorawan", "embedded-io/async"] | 9 | nightly = ["embassy-stm32/nightly", "embassy-lora", "lorawan-device", "lorawan", "embedded-io/async"] |
| 10 | 10 | ||
| 11 | [dependencies] | 11 | [dependencies] |
| 12 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 12 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 13 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 13 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 14 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 14 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 15 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32l072cz", "time-driver-any", "exti", "unstable-traits", "memory-x"] } | 15 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32l072cz", "time-driver-any", "exti", "unstable-traits", "memory-x"] } |
diff --git a/examples/stm32l1/Cargo.toml b/examples/stm32l1/Cargo.toml index cd9508d57..e071c5d27 100644 --- a/examples/stm32l1/Cargo.toml +++ b/examples/stm32l1/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32l151cb-a", "time-driver-any", "memory-x"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32l151cb-a", "time-driver-any", "memory-x"] } |
diff --git a/examples/stm32l4/Cargo.toml b/examples/stm32l4/Cargo.toml index fa39df6db..e83f261e6 100644 --- a/examples/stm32l4/Cargo.toml +++ b/examples/stm32l4/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal" } | 11 | embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal" } |
diff --git a/examples/stm32l5/Cargo.toml b/examples/stm32l5/Cargo.toml index 1c662b9da..af305a19d 100644 --- a/examples/stm32l5/Cargo.toml +++ b/examples/stm32l5/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32l552ze", "time-driver-any", "exti", "unstable-traits", "memory-x"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32l552ze", "time-driver-any", "exti", "unstable-traits", "memory-x"] } |
diff --git a/examples/stm32u5/Cargo.toml b/examples/stm32u5/Cargo.toml index ebef0a4f7..65fc1b988 100644 --- a/examples/stm32u5/Cargo.toml +++ b/examples/stm32u5/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32u585ai", "time-driver-any", "memory-x" ] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32u585ai", "time-driver-any", "memory-x" ] } |
diff --git a/examples/stm32wb/Cargo.toml b/examples/stm32wb/Cargo.toml index ddf9729e6..835985ec3 100644 --- a/examples/stm32wb/Cargo.toml +++ b/examples/stm32wb/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32wb55cc", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32wb55cc", "time-driver-any", "exti"] } |
diff --git a/examples/stm32wl/Cargo.toml b/examples/stm32wl/Cargo.toml index 0d2194ea2..df295ca49 100644 --- a/examples/stm32wl/Cargo.toml +++ b/examples/stm32wl/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32wl55jc-cm4", "time-driver-any", "memory-x", "unstable-pac", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32wl55jc-cm4", "time-driver-any", "memory-x", "unstable-pac", "exti"] } |
diff --git a/examples/wasm/Cargo.toml b/examples/wasm/Cargo.toml index 430d0b4c7..5f36eb77f 100644 --- a/examples/wasm/Cargo.toml +++ b/examples/wasm/Cargo.toml | |||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | |||
| 8 | crate-type = ["cdylib"] | 8 | crate-type = ["cdylib"] |
| 9 | 9 | ||
| 10 | [dependencies] | 10 | [dependencies] |
| 11 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["log"] } | 11 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["log"] } |
| 12 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-wasm", "executor-thread", "log", "nightly", "integrated-timers"] } | 12 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-wasm", "executor-thread", "log", "nightly", "integrated-timers"] } |
| 13 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["log", "wasm", "nightly"] } | 13 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["log", "wasm", "nightly"] } |
| 14 | 14 | ||
diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 9785cd9eb..f7183d167 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # Before upgrading check that everything is available on all tier1 targets here: | 1 | # Before upgrading check that everything is available on all tier1 targets here: |
| 2 | # https://rust-lang.github.io/rustup-components-history | 2 | # https://rust-lang.github.io/rustup-components-history |
| 3 | [toolchain] | 3 | [toolchain] |
| 4 | channel = "nightly-2023-04-02" | 4 | channel = "nightly-2023-04-11" |
| 5 | components = [ "rust-src", "rustfmt", "llvm-tools-preview" ] | 5 | components = [ "rust-src", "rustfmt", "llvm-tools-preview" ] |
| 6 | targets = [ | 6 | targets = [ |
| 7 | "thumbv7em-none-eabi", | 7 | "thumbv7em-none-eabi", |
diff --git a/tests/nrf/Cargo.toml b/tests/nrf/Cargo.toml index 912749e5d..22435e55b 100644 --- a/tests/nrf/Cargo.toml +++ b/tests/nrf/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 8 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 9 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt", "nightly"] } | 9 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt", "nightly"] } |
| 10 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "nightly", "integrated-timers"] } | 10 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "nightly", "integrated-timers"] } |
| 11 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "nightly", "defmt-timestamp-uptime"] } | 11 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "nightly", "defmt-timestamp-uptime"] } |
| 12 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nightly", "unstable-traits", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } | 12 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nightly", "unstable-traits", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } |
diff --git a/tests/riscv32/.cargo/config.toml b/tests/riscv32/.cargo/config.toml new file mode 100644 index 000000000..58299b54e --- /dev/null +++ b/tests/riscv32/.cargo/config.toml | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | [target.riscv32imac-unknown-none-elf] | ||
| 2 | runner = "true" | ||
| 3 | |||
| 4 | [build] | ||
| 5 | target = "riscv32imac-unknown-none-elf" | ||
diff --git a/tests/riscv32/Cargo.toml b/tests/riscv32/Cargo.toml new file mode 100644 index 000000000..01b424de8 --- /dev/null +++ b/tests/riscv32/Cargo.toml | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | [package] | ||
| 2 | edition = "2021" | ||
| 3 | name = "embassy-riscv-tests" | ||
| 4 | version = "0.1.0" | ||
| 5 | license = "MIT OR Apache-2.0" | ||
| 6 | |||
| 7 | [dependencies] | ||
| 8 | critical-section = { version = "1.1.1", features = ["restore-state-bool"] } | ||
| 9 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync" } | ||
| 10 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-riscv32", "nightly", "executor-thread"] } | ||
| 11 | embassy-time = { version = "0.1.0", path = "../../embassy-time" } | ||
| 12 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | ||
| 13 | |||
| 14 | riscv-rt = "0.11" | ||
| 15 | riscv = { version = "0.10", features = ["critical-section-single-hart"] } | ||
| 16 | |||
| 17 | |||
| 18 | [profile.dev] | ||
| 19 | debug = 2 | ||
| 20 | debug-assertions = true | ||
| 21 | opt-level = 's' | ||
| 22 | overflow-checks = true | ||
| 23 | |||
| 24 | [profile.release] | ||
| 25 | codegen-units = 1 | ||
| 26 | debug = 2 | ||
| 27 | debug-assertions = false | ||
| 28 | incremental = false | ||
| 29 | lto = "fat" | ||
| 30 | opt-level = 's' | ||
| 31 | overflow-checks = false | ||
| 32 | |||
| 33 | # do not optimize proc-macro crates = faster builds from scratch | ||
| 34 | [profile.dev.build-override] | ||
| 35 | codegen-units = 8 | ||
| 36 | debug = false | ||
| 37 | debug-assertions = false | ||
| 38 | opt-level = 0 | ||
| 39 | overflow-checks = false | ||
| 40 | |||
| 41 | [profile.release.build-override] | ||
| 42 | codegen-units = 8 | ||
| 43 | debug = false | ||
| 44 | debug-assertions = false | ||
| 45 | opt-level = 0 | ||
| 46 | overflow-checks = false | ||
diff --git a/tests/riscv32/build.rs b/tests/riscv32/build.rs new file mode 100644 index 000000000..e4a26c4a1 --- /dev/null +++ b/tests/riscv32/build.rs | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | use std::error::Error; | ||
| 2 | |||
| 3 | fn main() -> Result<(), Box<dyn Error>> { | ||
| 4 | println!("cargo:rustc-link-arg-bins=-Tmemory.x"); | ||
| 5 | println!("cargo:rustc-link-arg-bins=-Tlink.x"); | ||
| 6 | |||
| 7 | Ok(()) | ||
| 8 | } | ||
diff --git a/tests/riscv32/memory.x b/tests/riscv32/memory.x new file mode 100644 index 000000000..316d577d4 --- /dev/null +++ b/tests/riscv32/memory.x | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | MEMORY | ||
| 2 | { | ||
| 3 | ROM : ORIGIN = 0x80000000, LENGTH = 0x00020000 | ||
| 4 | RAM : ORIGIN = 0x84000000, LENGTH = 0x00008000 | ||
| 5 | } | ||
| 6 | |||
| 7 | REGION_ALIAS("REGION_TEXT", ROM); | ||
| 8 | REGION_ALIAS("REGION_RODATA", ROM); | ||
| 9 | REGION_ALIAS("REGION_DATA", RAM); | ||
| 10 | REGION_ALIAS("REGION_BSS", RAM); | ||
| 11 | REGION_ALIAS("REGION_HEAP", RAM); | ||
| 12 | REGION_ALIAS("REGION_STACK", RAM); | ||
| 13 | |||
| 14 | _stack_start = ORIGIN(RAM) + LENGTH(RAM) - 4; | ||
diff --git a/tests/riscv32/src/bin/empty.rs b/tests/riscv32/src/bin/empty.rs new file mode 100644 index 000000000..1874caec4 --- /dev/null +++ b/tests/riscv32/src/bin/empty.rs | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![no_main] | ||
| 3 | #![feature(type_alias_impl_trait)] | ||
| 4 | |||
| 5 | use embassy_executor::Spawner; | ||
| 6 | |||
| 7 | #[panic_handler] | ||
| 8 | fn panic(_info: &core::panic::PanicInfo) -> ! { | ||
| 9 | loop {} | ||
| 10 | } | ||
| 11 | |||
| 12 | #[embassy_executor::main] | ||
| 13 | async fn main(_spawner: Spawner) { | ||
| 14 | // Don't do anything, just make sure it compiles. | ||
| 15 | loop {} | ||
| 16 | } | ||
diff --git a/tests/rp/Cargo.toml b/tests/rp/Cargo.toml index 463a370fe..36ff735ec 100644 --- a/tests/rp/Cargo.toml +++ b/tests/rp/Cargo.toml | |||
| @@ -5,7 +5,7 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt"] } |
| 11 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["nightly", "defmt", "unstable-pac", "unstable-traits", "time-driver", "critical-section-impl"] } | 11 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["nightly", "defmt", "unstable-pac", "unstable-traits", "time-driver", "critical-section-impl"] } |
diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml index bd181f235..8b70a1015 100644 --- a/tests/stm32/Cargo.toml +++ b/tests/stm32/Cargo.toml | |||
| @@ -8,6 +8,7 @@ license = "MIT OR Apache-2.0" | |||
| 8 | stm32f103c8 = ["embassy-stm32/stm32f103c8"] # Blue Pill | 8 | stm32f103c8 = ["embassy-stm32/stm32f103c8"] # Blue Pill |
| 9 | stm32f429zi = ["embassy-stm32/stm32f429zi"] # Nucleo | 9 | stm32f429zi = ["embassy-stm32/stm32f429zi"] # Nucleo |
| 10 | stm32g071rb = ["embassy-stm32/stm32g071rb"] # Nucleo | 10 | stm32g071rb = ["embassy-stm32/stm32g071rb"] # Nucleo |
| 11 | stm32c031c6 = ["embassy-stm32/stm32c031c6"] # Nucleo | ||
| 11 | stm32g491re = ["embassy-stm32/stm32g491re"] # Nucleo | 12 | stm32g491re = ["embassy-stm32/stm32g491re"] # Nucleo |
| 12 | stm32h755zi = ["embassy-stm32/stm32h755zi-cm7"] # Nucleo | 13 | stm32h755zi = ["embassy-stm32/stm32h755zi-cm7"] # Nucleo |
| 13 | stm32wb55rg = ["embassy-stm32/stm32wb55rg"] # Nucleo | 14 | stm32wb55rg = ["embassy-stm32/stm32wb55rg"] # Nucleo |
| @@ -15,10 +16,10 @@ stm32h563zi = ["embassy-stm32/stm32h563zi"] # Nucleo | |||
| 15 | stm32u585ai = ["embassy-stm32/stm32u585ai"] # IoT board | 16 | stm32u585ai = ["embassy-stm32/stm32u585ai"] # IoT board |
| 16 | 17 | ||
| 17 | [dependencies] | 18 | [dependencies] |
| 18 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 19 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 19 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 20 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 20 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "tick-hz-32_768"] } | 21 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "tick-hz-32_768"] } |
| 21 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "memory-x", "time-driver-tim2"] } | 22 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "memory-x", "time-driver-any"] } |
| 22 | 23 | ||
| 23 | defmt = "0.3.0" | 24 | defmt = "0.3.0" |
| 24 | defmt-rtt = "0.4" | 25 | defmt-rtt = "0.4" |
diff --git a/tests/stm32/build.rs b/tests/stm32/build.rs index 6f4872249..3e67a7392 100644 --- a/tests/stm32/build.rs +++ b/tests/stm32/build.rs | |||
| @@ -9,7 +9,13 @@ fn main() -> Result<(), Box<dyn Error>> { | |||
| 9 | println!("cargo:rerun-if-changed=link_ram.x"); | 9 | println!("cargo:rerun-if-changed=link_ram.x"); |
| 10 | 10 | ||
| 11 | println!("cargo:rustc-link-arg-bins=--nmagic"); | 11 | println!("cargo:rustc-link-arg-bins=--nmagic"); |
| 12 | |||
| 13 | // too little RAM to run from RAM. | ||
| 14 | #[cfg(any(feature = "stm32c031c6"))] | ||
| 15 | println!("cargo:rustc-link-arg-bins=-Tlink.x"); | ||
| 16 | #[cfg(not(any(feature = "stm32c031c6")))] | ||
| 12 | println!("cargo:rustc-link-arg-bins=-Tlink_ram.x"); | 17 | println!("cargo:rustc-link-arg-bins=-Tlink_ram.x"); |
| 18 | |||
| 13 | println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); | 19 | println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); |
| 14 | 20 | ||
| 15 | Ok(()) | 21 | Ok(()) |
diff --git a/tests/stm32/src/bin/gpio.rs b/tests/stm32/src/bin/gpio.rs index 6a36df8cc..8b99b08a5 100644 --- a/tests/stm32/src/bin/gpio.rs +++ b/tests/stm32/src/bin/gpio.rs | |||
| @@ -32,6 +32,8 @@ async fn main(_spawner: Spawner) { | |||
| 32 | let (mut a, mut b) = (p.PD9, p.PD8); | 32 | let (mut a, mut b) = (p.PD9, p.PD8); |
| 33 | #[cfg(feature = "stm32h563zi")] | 33 | #[cfg(feature = "stm32h563zi")] |
| 34 | let (mut a, mut b) = (p.PB6, p.PB7); | 34 | let (mut a, mut b) = (p.PB6, p.PB7); |
| 35 | #[cfg(feature = "stm32c031c6")] | ||
| 36 | let (mut a, mut b) = (p.PB6, p.PB7); | ||
| 35 | 37 | ||
| 36 | // Test initial output | 38 | // Test initial output |
| 37 | { | 39 | { |
diff --git a/tests/stm32/src/bin/spi.rs b/tests/stm32/src/bin/spi.rs index bf8098b1b..0f5e563b1 100644 --- a/tests/stm32/src/bin/spi.rs +++ b/tests/stm32/src/bin/spi.rs | |||
| @@ -32,6 +32,8 @@ async fn main(_spawner: Spawner) { | |||
| 32 | let (spi, sck, mosi, miso) = (p.SPI1, p.PE13, p.PE15, p.PE14); | 32 | let (spi, sck, mosi, miso) = (p.SPI1, p.PE13, p.PE15, p.PE14); |
| 33 | #[cfg(feature = "stm32h563zi")] | 33 | #[cfg(feature = "stm32h563zi")] |
| 34 | let (spi, sck, mosi, miso) = (p.SPI4, p.PE12, p.PE14, p.PE13); | 34 | let (spi, sck, mosi, miso) = (p.SPI4, p.PE12, p.PE14, p.PE13); |
| 35 | #[cfg(feature = "stm32c031c6")] | ||
| 36 | let (spi, sck, mosi, miso) = (p.SPI1, p.PA5, p.PA7, p.PA6); | ||
| 35 | 37 | ||
| 36 | info!("asdfa;"); | 38 | info!("asdfa;"); |
| 37 | let mut spi = Spi::new( | 39 | let mut spi = Spi::new( |
| @@ -49,7 +51,7 @@ async fn main(_spawner: Spawner) { | |||
| 49 | 51 | ||
| 50 | // Arduino pins D11 and D12 (MOSI-MISO) are connected together with a 1K resistor. | 52 | // Arduino pins D11 and D12 (MOSI-MISO) are connected together with a 1K resistor. |
| 51 | // so we should get the data we sent back. | 53 | // so we should get the data we sent back. |
| 52 | let mut buf = data; | 54 | let mut buf = [0; 9]; |
| 53 | spi.blocking_transfer(&mut buf, &data).unwrap(); | 55 | spi.blocking_transfer(&mut buf, &data).unwrap(); |
| 54 | assert_eq!(buf, data); | 56 | assert_eq!(buf, data); |
| 55 | 57 | ||
diff --git a/tests/stm32/src/bin/spi_dma.rs b/tests/stm32/src/bin/spi_dma.rs index b3dad8132..74776ebf8 100644 --- a/tests/stm32/src/bin/spi_dma.rs +++ b/tests/stm32/src/bin/spi_dma.rs | |||
| @@ -31,6 +31,8 @@ async fn main(_spawner: Spawner) { | |||
| 31 | let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI1, p.PE13, p.PE15, p.PE14, p.GPDMA1_CH0, p.GPDMA1_CH1); | 31 | let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI1, p.PE13, p.PE15, p.PE14, p.GPDMA1_CH0, p.GPDMA1_CH1); |
| 32 | #[cfg(feature = "stm32h563zi")] | 32 | #[cfg(feature = "stm32h563zi")] |
| 33 | let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI4, p.PE12, p.PE14, p.PE13, p.GPDMA1_CH0, p.GPDMA1_CH1); | 33 | let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI4, p.PE12, p.PE14, p.PE13, p.GPDMA1_CH0, p.GPDMA1_CH1); |
| 34 | #[cfg(feature = "stm32c031c6")] | ||
| 35 | let (spi, sck, mosi, miso, tx_dma, rx_dma) = (p.SPI1, p.PA5, p.PA7, p.PA6, p.DMA1_CH1, p.DMA1_CH2); | ||
| 34 | 36 | ||
| 35 | let mut spi = Spi::new( | 37 | let mut spi = Spi::new( |
| 36 | spi, | 38 | spi, |
diff --git a/tests/stm32/src/bin/usart.rs b/tests/stm32/src/bin/usart.rs index 52409567c..cca8c42ee 100644 --- a/tests/stm32/src/bin/usart.rs +++ b/tests/stm32/src/bin/usart.rs | |||
| @@ -34,6 +34,8 @@ async fn main(_spawner: Spawner) { | |||
| 34 | let (tx, rx, usart, irq) = (p.PD8, p.PD9, p.USART3, interrupt::take!(USART3)); | 34 | let (tx, rx, usart, irq) = (p.PD8, p.PD9, p.USART3, interrupt::take!(USART3)); |
| 35 | #[cfg(feature = "stm32h563zi")] | 35 | #[cfg(feature = "stm32h563zi")] |
| 36 | let (tx, rx, usart, irq) = (p.PB6, p.PB7, p.LPUART1, interrupt::take!(LPUART1)); | 36 | let (tx, rx, usart, irq) = (p.PB6, p.PB7, p.LPUART1, interrupt::take!(LPUART1)); |
| 37 | #[cfg(feature = "stm32c031c6")] | ||
| 38 | let (tx, rx, usart, irq) = (p.PB6, p.PB7, p.USART1, interrupt::take!(USART1)); | ||
| 37 | 39 | ||
| 38 | let config = Config::default(); | 40 | let config = Config::default(); |
| 39 | let mut usart = Uart::new(usart, rx, tx, irq, NoDma, NoDma, config); | 41 | let mut usart = Uart::new(usart, rx, tx, irq, NoDma, NoDma, config); |
diff --git a/tests/stm32/src/bin/usart_dma.rs b/tests/stm32/src/bin/usart_dma.rs index 3f70791c1..d673df0f3 100644 --- a/tests/stm32/src/bin/usart_dma.rs +++ b/tests/stm32/src/bin/usart_dma.rs | |||
| @@ -71,6 +71,9 @@ async fn main(_spawner: Spawner) { | |||
| 71 | p.GPDMA1_CH0, | 71 | p.GPDMA1_CH0, |
| 72 | p.GPDMA1_CH1, | 72 | p.GPDMA1_CH1, |
| 73 | ); | 73 | ); |
| 74 | #[cfg(feature = "stm32c031c6")] | ||
| 75 | let (tx, rx, usart, irq, tx_dma, rx_dma) = | ||
| 76 | (p.PB6, p.PB7, p.USART1, interrupt::take!(USART1), p.DMA1_CH1, p.DMA1_CH2); | ||
| 74 | 77 | ||
| 75 | let config = Config::default(); | 78 | let config = Config::default(); |
| 76 | let mut usart = Uart::new(usart, rx, tx, irq, tx_dma, rx_dma, config); | 79 | let mut usart = Uart::new(usart, rx, tx, irq, tx_dma, rx_dma, config); |
