aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsander <[email protected]>2023-04-14 10:44:51 +0200
committersander <[email protected]>2023-04-14 10:44:51 +0200
commitce0e1a5db36505884e7f46577b4b407808c20a82 (patch)
tree0e87248c13f3bac757560235faa2485acf81ce90
parent1b86570cfd480b0821de555780a2dbdaa7ec562d (diff)
parenta3ecf5caf614e17b2e1cb3d1f79d8313f2e71a63 (diff)
Merge commit '82f528927b2fde275c2e9b6fd737baf439cb296a'
-rwxr-xr-xci.sh2
-rw-r--r--embassy-boot/boot/Cargo.toml2
-rw-r--r--embassy-cortex-m/Cargo.toml2
-rw-r--r--embassy-embedded-hal/Cargo.toml2
-rw-r--r--embassy-executor/src/arch/riscv32.rs3
-rw-r--r--embassy-hal-common/src/macros.rs2
-rw-r--r--embassy-hal-common/src/peripheral.rs12
-rw-r--r--embassy-lora/Cargo.toml2
-rw-r--r--embassy-net-driver-channel/Cargo.toml2
-rw-r--r--embassy-net/Cargo.toml2
-rw-r--r--embassy-nrf/Cargo.toml2
-rw-r--r--embassy-nrf/src/buffered_uarte.rs2
-rw-r--r--embassy-nrf/src/saadc.rs2
-rw-r--r--embassy-nrf/src/timer.rs6
-rw-r--r--embassy-nrf/src/uarte.rs2
-rw-r--r--embassy-nrf/src/usb/mod.rs2
-rw-r--r--embassy-rp/Cargo.toml2
-rw-r--r--embassy-stm32/Cargo.toml6
-rw-r--r--embassy-stm32/build.rs2
-rw-r--r--embassy-stm32/src/flash/common.rs3
-rw-r--r--embassy-stm32/src/flash/f4.rs2
-rw-r--r--embassy-stm32/src/gpio.rs2
-rw-r--r--embassy-stm32/src/rcc/f2.rs2
-rw-r--r--embassy-stm32/src/time.rs12
-rw-r--r--embassy-sync/CHANGELOG.md22
-rw-r--r--embassy-sync/Cargo.toml2
-rw-r--r--embassy-time/CHANGELOG.md24
-rw-r--r--embassy-time/Cargo.toml3
-rw-r--r--embassy-time/src/driver_std.rs20
-rw-r--r--embassy-time/src/queue_generic.rs12
-rw-r--r--embassy-usb-logger/Cargo.toml2
-rw-r--r--embassy-usb/Cargo.toml2
-rw-r--r--examples/boot/application/nrf/Cargo.toml2
-rw-r--r--examples/boot/application/rp/Cargo.toml2
-rw-r--r--examples/boot/application/stm32f3/Cargo.toml2
-rw-r--r--examples/boot/application/stm32f7/Cargo.toml2
-rw-r--r--examples/boot/application/stm32h7/Cargo.toml2
-rw-r--r--examples/boot/application/stm32l0/Cargo.toml2
-rw-r--r--examples/boot/application/stm32l1/Cargo.toml2
-rw-r--r--examples/boot/application/stm32l4/Cargo.toml2
-rw-r--r--examples/boot/application/stm32wl/Cargo.toml2
-rw-r--r--examples/nrf-rtos-trace/Cargo.toml2
-rw-r--r--examples/nrf52840/Cargo.toml2
-rw-r--r--examples/nrf5340/Cargo.toml2
-rw-r--r--examples/rp/Cargo.toml2
-rw-r--r--examples/std/Cargo.toml2
-rw-r--r--examples/stm32c0/Cargo.toml2
-rw-r--r--examples/stm32f0/Cargo.toml2
-rw-r--r--examples/stm32f1/Cargo.toml2
-rw-r--r--examples/stm32f2/Cargo.toml2
-rw-r--r--examples/stm32f3/Cargo.toml2
-rw-r--r--examples/stm32f4/Cargo.toml2
-rw-r--r--examples/stm32f7/Cargo.toml2
-rw-r--r--examples/stm32g0/Cargo.toml2
-rw-r--r--examples/stm32g4/Cargo.toml2
-rw-r--r--examples/stm32h5/Cargo.toml2
-rw-r--r--examples/stm32h7/Cargo.toml2
-rw-r--r--examples/stm32l0/Cargo.toml2
-rw-r--r--examples/stm32l1/Cargo.toml2
-rw-r--r--examples/stm32l4/Cargo.toml2
-rw-r--r--examples/stm32l5/Cargo.toml2
-rw-r--r--examples/stm32u5/Cargo.toml2
-rw-r--r--examples/stm32wb/Cargo.toml2
-rw-r--r--examples/stm32wl/Cargo.toml2
-rw-r--r--examples/wasm/Cargo.toml2
-rw-r--r--rust-toolchain.toml2
-rw-r--r--tests/nrf/Cargo.toml2
-rw-r--r--tests/riscv32/.cargo/config.toml5
-rw-r--r--tests/riscv32/Cargo.toml46
-rw-r--r--tests/riscv32/build.rs8
-rw-r--r--tests/riscv32/memory.x14
-rw-r--r--tests/riscv32/src/bin/empty.rs16
-rw-r--r--tests/rp/Cargo.toml2
-rw-r--r--tests/stm32/Cargo.toml5
-rw-r--r--tests/stm32/build.rs6
-rw-r--r--tests/stm32/src/bin/gpio.rs2
-rw-r--r--tests/stm32/src/bin/spi.rs4
-rw-r--r--tests/stm32/src/bin/spi_dma.rs2
-rw-r--r--tests/stm32/src/bin/usart.rs2
-rw-r--r--tests/stm32/src/bin/usart_dma.rs3
80 files changed, 251 insertions, 99 deletions
diff --git a/ci.sh b/ci.sh
index 47bf5d660..1b3fac8bc 100755
--- a/ci.sh
+++ b/ci.sh
@@ -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 }
27digest = "0.10" 27digest = "0.10"
28log = { version = "0.4", optional = true } 28log = { version = "0.4", optional = true }
29ed25519-dalek = { version = "1.0.1", default_features = false, features = ["u32_backend"], optional = true } 29ed25519-dalek = { version = "1.0.1", default_features = false, features = ["u32_backend"], optional = true }
30embassy-sync = { version = "0.1.0", path = "../../embassy-sync" } 30embassy-sync = { version = "0.2.0", path = "../../embassy-sync" }
31embedded-storage = "0.3.0" 31embedded-storage = "0.3.0"
32embedded-storage-async = { version = "0.4.0", optional = true} 32embedded-storage-async = { version = "0.4.0", optional = true}
33salty = { git = "https://github.com/ycrypto/salty.git", rev = "a9f17911a5024698406b75c0fac56ab5ccf6a8c7", optional = true } 33salty = { 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 = []
36defmt = { version = "0.3", optional = true } 36defmt = { version = "0.3", optional = true }
37log = { version = "0.4.14", optional = true } 37log = { version = "0.4.14", optional = true }
38 38
39embassy-sync = { version = "0.1.0", path = "../embassy-sync" } 39embassy-sync = { version = "0.2.0", path = "../embassy-sync" }
40embassy-executor = { version = "0.1.0", path = "../embassy-executor"} 40embassy-executor = { version = "0.1.0", path = "../embassy-executor"}
41embassy-macros = { version = "0.1.0", path = "../embassy-macros"} 41embassy-macros = { version = "0.1.0", path = "../embassy-macros"}
42embassy-hal-common = { version = "0.1.0", path = "../embassy-hal-common"} 42embassy-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 = []
17nightly = ["embedded-hal-async", "embedded-storage-async"] 17nightly = ["embedded-hal-async", "embedded-storage-async"]
18 18
19[dependencies] 19[dependencies]
20embassy-sync = { version = "0.1.0", path = "../embassy-sync" } 20embassy-sync = { version = "0.2.0", path = "../embassy-sync" }
21embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } 21embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
22embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.10" } 22embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.10" }
23embedded-hal-async = { version = "=0.2.0-alpha.1", optional = true } 23embedded-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
164impl<'b, T: DerefMut> Peripheral for T 164impl<'b, T: Deref> Peripheral for T
165where 165where
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 }
29log = { version = "0.4.14", optional = true } 29log = { version = "0.4.14", optional = true }
30 30
31embassy-time = { version = "0.1.0", path = "../embassy-time" } 31embassy-time = { version = "0.1.0", path = "../embassy-time" }
32embassy-sync = { version = "0.1.0", path = "../embassy-sync" } 32embassy-sync = { version = "0.2.0", path = "../embassy-sync" }
33embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32", default-features = false, optional = true } 33embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32", default-features = false, optional = true }
34embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.10" } 34embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.10" }
35embedded-hal-async = { version = "=0.2.0-alpha.1" } 35embedded-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"
13defmt = { version = "0.3", optional = true } 13defmt = { version = "0.3", optional = true }
14log = { version = "0.4.14", optional = true } 14log = { version = "0.4.14", optional = true }
15 15
16embassy-sync = { version = "0.1.0", path = "../embassy-sync" } 16embassy-sync = { version = "0.2.0", path = "../embassy-sync" }
17embassy-futures = { version = "0.1.0", path = "../embassy-futures" } 17embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
18embassy-net-driver = { version = "0.1.0", path = "../embassy-net-driver" } 18embassy-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 = [
43embassy-net-driver = { version = "0.1.0", path = "../embassy-net-driver" } 43embassy-net-driver = { version = "0.1.0", path = "../embassy-net-driver" }
44embassy-hal-common = { version = "0.1.0", path = "../embassy-hal-common" } 44embassy-hal-common = { version = "0.1.0", path = "../embassy-hal-common" }
45embassy-time = { version = "0.1.0", path = "../embassy-time" } 45embassy-time = { version = "0.1.0", path = "../embassy-time" }
46embassy-sync = { version = "0.1.0", path = "../embassy-sync" } 46embassy-sync = { version = "0.2.0", path = "../embassy-sync" }
47embedded-io = { version = "0.4.0", optional = true } 47embedded-io = { version = "0.4.0", optional = true }
48 48
49managed = { version = "0.8.0", default-features = false, features = [ "map" ] } 49managed = { 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]
81embassy-executor = { version = "0.1.0", path = "../embassy-executor", optional = true } 81embassy-executor = { version = "0.1.0", path = "../embassy-executor", optional = true }
82embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true } 82embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true }
83embassy-sync = { version = "0.1.0", path = "../embassy-sync" } 83embassy-sync = { version = "0.2.0", path = "../embassy-sync" }
84embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-3"]} 84embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-3"]}
85embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } 85embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" }
86embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } 86embassy-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", "
39unstable-traits = ["embedded-hal-1", "embedded-hal-nb"] 39unstable-traits = ["embedded-hal-1", "embedded-hal-nb"]
40 40
41[dependencies] 41[dependencies]
42embassy-sync = { version = "0.1.0", path = "../embassy-sync" } 42embassy-sync = { version = "0.2.0", path = "../embassy-sync" }
43embassy-executor = { version = "0.1.0", path = "../embassy-executor" } 43embassy-executor = { version = "0.1.0", path = "../embassy-executor" }
44embassy-time = { version = "0.1.0", path = "../embassy-time", features = [ "tick-hz-1_000_000" ] } 44embassy-time = { version = "0.1.0", path = "../embassy-time", features = [ "tick-hz-1_000_000" ] }
45embassy-futures = { version = "0.1.0", path = "../embassy-futures" } 45embassy-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]
34embassy-sync = { version = "0.1.0", path = "../embassy-sync" } 34embassy-sync = { version = "0.2.0", path = "../embassy-sync" }
35embassy-executor = { version = "0.1.0", path = "../embassy-executor" } 35embassy-executor = { version = "0.1.0", path = "../embassy-executor" }
36embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true } 36embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true }
37embassy-futures = { version = "0.1.0", path = "../embassy-futures" } 37embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
@@ -58,7 +58,7 @@ sdio-host = "0.5.0"
58embedded-sdmmc = { git = "https://github.com/embassy-rs/embedded-sdmmc-rs", rev = "46d1b1c2ff13e31e282ec1e352421721694f126a", optional = true } 58embedded-sdmmc = { git = "https://github.com/embassy-rs/embedded-sdmmc-rs", rev = "46d1b1c2ff13e31e282ec1e352421721694f126a", optional = true }
59critical-section = "1.1" 59critical-section = "1.1"
60atomic-polyfill = "1.0.1" 60atomic-polyfill = "1.0.1"
61stm32-metapac = "5" 61stm32-metapac = "6"
62vcell = "0.1.3" 62vcell = "0.1.3"
63bxcan = "0.7.0" 63bxcan = "0.7.0"
64nb = "1.0.0" 64nb = "1.0.0"
@@ -73,7 +73,7 @@ critical-section = { version = "1.1", features = ["std"] }
73[build-dependencies] 73[build-dependencies]
74proc-macro2 = "1.0.36" 74proc-macro2 = "1.0.36"
75quote = "1.0.15" 75quote = "1.0.15"
76stm32-metapac = { version = "5", default-features = false, features = ["metadata"]} 76stm32-metapac = { version = "6", default-features = false, features = ["metadata"]}
77 77
78[features] 78[features]
79default = ["stm32-metapac/rt"] 79default = ["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};
8pub struct Hertz(pub u32); 8pub struct Hertz(pub u32);
9 9
10impl Hertz { 10impl 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`]
25pub fn hz(hertz: u32) -> Hertz { 25pub 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`]
30pub fn khz(kilohertz: u32) -> Hertz { 30pub 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`]
35pub fn mhz(megahertz: u32) -> Hertz { 35pub 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
3All notable changes to this project will be documented in this file.
4
5The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6and 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]
2name = "embassy-sync" 2name = "embassy-sync"
3version = "0.1.0" 3version = "0.2.0"
4edition = "2021" 4edition = "2021"
5description = "no-std, no-alloc synchronization primitives with async support" 5description = "no-std, no-alloc synchronization primitives with async support"
6repository = "https://github.com/embassy-rs/embassy" 6repository = "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
3All notable changes to this project will be documented in this file.
4
5The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6and 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]
2name = "embassy-time" 2name = "embassy-time"
3version = "0.1.0" 3version = "0.1.1"
4edition = "2021" 4edition = "2021"
5description = "Instant and Duration for embedded no-std systems, with async timer support" 5description = "Instant and Duration for embedded no-std systems, with async timer support"
6repository = "https://github.com/embassy-rs/embassy" 6repository = "https://github.com/embassy-rs/embassy"
@@ -156,7 +156,6 @@ embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-alpha.10", option
156embedded-hal-async = { version = "=0.2.0-alpha.1", optional = true} 156embedded-hal-async = { version = "=0.2.0-alpha.1", optional = true}
157 157
158futures-util = { version = "0.3.17", default-features = false } 158futures-util = { version = "0.3.17", default-features = false }
159embassy-sync = { version = "0.1", path = "../embassy-sync" }
160atomic-polyfill = "1.0.1" 159atomic-polyfill = "1.0.1"
161critical-section = "1.1" 160critical-section = "1.1"
162cfg-if = "1.0.0" 161cfg-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};
5use std::{mem, ptr, thread}; 5use std::{mem, ptr, thread};
6 6
7use atomic_polyfill::{AtomicU8, Ordering}; 7use atomic_polyfill::{AtomicU8, Ordering};
8use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; 8use critical_section::Mutex as CsMutex;
9use embassy_sync::blocking_mutex::Mutex as EmbassyMutex;
10 9
11use crate::driver::{AlarmHandle, Driver}; 10use 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 {
58impl TimeDriver { 57impl 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;
2use core::cmp::{min, Ordering}; 2use core::cmp::{min, Ordering};
3use core::task::Waker; 3use core::task::Waker;
4 4
5use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; 5use critical_section::Mutex;
6use embassy_sync::blocking_mutex::Mutex;
7use heapless::Vec; 6use heapless::Vec;
8 7
9use crate::driver::{allocate_alarm, set_alarm, set_alarm_callback, AlarmHandle}; 8use crate::driver::{allocate_alarm, set_alarm, set_alarm_callback, AlarmHandle};
@@ -129,7 +128,7 @@ impl InnerQueue {
129} 128}
130 129
131struct Queue { 130struct Queue {
132 inner: Mutex<CriticalSectionRawMutex, RefCell<Option<InnerQueue>>>, 131 inner: Mutex<RefCell<Option<InnerQueue>>>,
133} 132}
134 133
135impl Queue { 134impl 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]
12embassy-usb = { version = "0.1.0", path = "../embassy-usb" } 12embassy-usb = { version = "0.1.0", path = "../embassy-usb" }
13embassy-sync = { version = "0.1.0", path = "../embassy-sync" } 13embassy-sync = { version = "0.2.0", path = "../embassy-sync" }
14embassy-futures = { version = "0.1.0", path = "../embassy-futures" } 14embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
15futures = { version = "0.3", default-features = false } 15futures = { version = "0.3", default-features = false }
16static_cell = "1" 16static_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]
42embassy-futures = { version = "0.1.0", path = "../embassy-futures" } 42embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
43embassy-usb-driver = { version = "0.1.0", path = "../embassy-usb-driver" } 43embassy-usb-driver = { version = "0.1.0", path = "../embassy-usb-driver" }
44embassy-sync = { version = "0.1.0", path = "../embassy-sync" } 44embassy-sync = { version = "0.2.0", path = "../embassy-sync" }
45embassy-net-driver-channel = { version = "0.1.0", path = "../embassy-net-driver-channel" } 45embassy-net-driver-channel = { version = "0.1.0", path = "../embassy-net-driver-channel" }
46 46
47defmt = { version = "0.3", optional = true } 47defmt = { 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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync" } 8embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync" }
9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] } 9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] }
10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly"] } 10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly"] }
11embassy-nrf = { version = "0.1.0", path = "../../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", "nightly"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync" } 8embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync" }
9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] } 9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers", "arch-cortex-m", "executor-thread"] }
10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly"] } 10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly"] }
11embassy-rp = { version = "0.1.0", path = "../../../../embassy-rp", features = ["time-driver", "unstable-traits", "nightly"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f303re", "time-driver-any", "exti"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f767zi", "time-driver-any", "exti"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync" } 8embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync" }
9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32h743zi", "time-driver-any", "exti"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l072cz", "time-driver-any", "exti", "memory-x"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l151cb-a", "time-driver-any", "exti"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l475vg", "time-driver-any", "exti"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "nightly", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32wl55jc-cm4", "time-driver-any", "exti"] } 11embassy-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]
19embassy-sync = { version = "0.1.0", path = "../../embassy-sync" } 19embassy-sync = { version = "0.2.0", path = "../../embassy-sync" }
20embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "rtos-trace", "rtos-trace-interrupt", "integrated-timers"] } 20embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "rtos-trace", "rtos-trace-interrupt", "integrated-timers"] }
21embassy-time = { version = "0.1.0", path = "../../embassy-time" } 21embassy-time = { version = "0.1.0", path = "../../embassy-time" }
22embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } 22embassy-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]
13embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } 13embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
14embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 14embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
15embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } 15embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] }
16embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } 16embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
17embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } 17embassy-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]
8embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } 8embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
9embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = [ 9embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = [
10 "defmt", 10 "defmt",
11] } 11] }
12embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", 12embassy-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]
9embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal", features = ["defmt"] } 9embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal", features = ["defmt"] }
10embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 10embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
11embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 11embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
12embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } 12embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
13embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver", "pio", "critical-section-impl"] } 13embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["log"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["log"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-std", "executor-thread", "log", "nightly", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-std", "executor-thread", "log", "nightly", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["log", "std", "nightly"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["log", "std", "nightly"] }
11embassy-net = { version = "0.1.0", path = "../../embassy-net", features=[ "std", "nightly", "log", "medium-ethernet", "tcp", "udp", "dns", "dhcpv4", "unstable-traits", "proto-ipv6"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32c031c6", "memory-x", "unstable-pac", "exti"] } 11embassy-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"
12defmt = "0.3" 12defmt = "0.3"
13defmt-rtt = "0.4" 13defmt-rtt = "0.4"
14panic-probe = "0.3" 14panic-probe = "0.3"
15embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 15embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
16embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } 16embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] }
17embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 17embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
18embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "memory-x", "stm32f091rc", "time-driver-any", "exti", "unstable-pac"] } 18embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-any", "unstable-traits" ] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f207zg", "unstable-pac", "memory-x", "time-driver-any", "exti"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f303ze", "unstable-pac", "memory-x", "time-driver-any", "exti"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-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"] } 9embassy-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"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "unstable-traits", "defmt", "stm32f429zi", "unstable-pac", "memory-x", "time-driver-any", "exti"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f767zi", "unstable-pac", "time-driver-any", "exti"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g071rb", "memory-x", "unstable-pac", "exti"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g491re", "memory-x", "unstable-pac", "exti"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h563zi", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h743bi", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } 11embassy-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"]
9nightly = ["embassy-stm32/nightly", "embassy-lora", "lorawan-device", "lorawan", "embedded-io/async"] 9nightly = ["embassy-stm32/nightly", "embassy-lora", "lorawan-device", "lorawan", "embedded-io/async"]
10 10
11[dependencies] 11[dependencies]
12embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 12embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
13embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 13embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
14embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 14embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
15embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32l072cz", "time-driver-any", "exti", "unstable-traits", "memory-x"] } 15embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32l151cb-a", "time-driver-any", "memory-x"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
11embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal" } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32l552ze", "time-driver-any", "exti", "unstable-traits", "memory-x"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32u585ai", "time-driver-any", "memory-x" ] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32wb55cc", "time-driver-any", "exti"] } 11embassy-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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32wl55jc-cm4", "time-driver-any", "memory-x", "unstable-pac", "exti"] } 11embassy-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"
8crate-type = ["cdylib"] 8crate-type = ["cdylib"]
9 9
10[dependencies] 10[dependencies]
11embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["log"] } 11embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["log"] }
12embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-wasm", "executor-thread", "log", "nightly", "integrated-timers"] } 12embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-wasm", "executor-thread", "log", "nightly", "integrated-timers"] }
13embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["log", "wasm", "nightly"] } 13embassy-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]
4channel = "nightly-2023-04-02" 4channel = "nightly-2023-04-11"
5components = [ "rust-src", "rustfmt", "llvm-tools-preview" ] 5components = [ "rust-src", "rustfmt", "llvm-tools-preview" ]
6targets = [ 6targets = [
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]
8embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } 8embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
9embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt", "nightly"] } 9embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt", "nightly"] }
10embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "nightly", "integrated-timers"] } 10embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "nightly", "integrated-timers"] }
11embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "nightly", "defmt-timestamp-uptime"] } 11embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "nightly", "defmt-timestamp-uptime"] }
12embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["defmt", "nightly", "unstable-traits", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } 12embassy-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]
2runner = "true"
3
4[build]
5target = "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]
2edition = "2021"
3name = "embassy-riscv-tests"
4version = "0.1.0"
5license = "MIT OR Apache-2.0"
6
7[dependencies]
8critical-section = { version = "1.1.1", features = ["restore-state-bool"] }
9embassy-sync = { version = "0.2.0", path = "../../embassy-sync" }
10embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-riscv32", "nightly", "executor-thread"] }
11embassy-time = { version = "0.1.0", path = "../../embassy-time" }
12embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
13
14riscv-rt = "0.11"
15riscv = { version = "0.10", features = ["critical-section-single-hart"] }
16
17
18[profile.dev]
19debug = 2
20debug-assertions = true
21opt-level = 's'
22overflow-checks = true
23
24[profile.release]
25codegen-units = 1
26debug = 2
27debug-assertions = false
28incremental = false
29lto = "fat"
30opt-level = 's'
31overflow-checks = false
32
33# do not optimize proc-macro crates = faster builds from scratch
34[profile.dev.build-override]
35codegen-units = 8
36debug = false
37debug-assertions = false
38opt-level = 0
39overflow-checks = false
40
41[profile.release.build-override]
42codegen-units = 8
43debug = false
44debug-assertions = false
45opt-level = 0
46overflow-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 @@
1use std::error::Error;
2
3fn 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 @@
1MEMORY
2{
3 ROM : ORIGIN = 0x80000000, LENGTH = 0x00020000
4 RAM : ORIGIN = 0x84000000, LENGTH = 0x00008000
5}
6
7REGION_ALIAS("REGION_TEXT", ROM);
8REGION_ALIAS("REGION_RODATA", ROM);
9REGION_ALIAS("REGION_DATA", RAM);
10REGION_ALIAS("REGION_BSS", RAM);
11REGION_ALIAS("REGION_HEAP", RAM);
12REGION_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
5use embassy_executor::Spawner;
6
7#[panic_handler]
8fn panic(_info: &core::panic::PanicInfo) -> ! {
9 loop {}
10}
11
12#[embassy_executor::main]
13async 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"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6 6
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt"] }
11embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["nightly", "defmt", "unstable-pac", "unstable-traits", "time-driver", "critical-section-impl"] } 11embassy-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"
8stm32f103c8 = ["embassy-stm32/stm32f103c8"] # Blue Pill 8stm32f103c8 = ["embassy-stm32/stm32f103c8"] # Blue Pill
9stm32f429zi = ["embassy-stm32/stm32f429zi"] # Nucleo 9stm32f429zi = ["embassy-stm32/stm32f429zi"] # Nucleo
10stm32g071rb = ["embassy-stm32/stm32g071rb"] # Nucleo 10stm32g071rb = ["embassy-stm32/stm32g071rb"] # Nucleo
11stm32c031c6 = ["embassy-stm32/stm32c031c6"] # Nucleo
11stm32g491re = ["embassy-stm32/stm32g491re"] # Nucleo 12stm32g491re = ["embassy-stm32/stm32g491re"] # Nucleo
12stm32h755zi = ["embassy-stm32/stm32h755zi-cm7"] # Nucleo 13stm32h755zi = ["embassy-stm32/stm32h755zi-cm7"] # Nucleo
13stm32wb55rg = ["embassy-stm32/stm32wb55rg"] # Nucleo 14stm32wb55rg = ["embassy-stm32/stm32wb55rg"] # Nucleo
@@ -15,10 +16,10 @@ stm32h563zi = ["embassy-stm32/stm32h563zi"] # Nucleo
15stm32u585ai = ["embassy-stm32/stm32u585ai"] # IoT board 16stm32u585ai = ["embassy-stm32/stm32u585ai"] # IoT board
16 17
17[dependencies] 18[dependencies]
18embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 19embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] }
19embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } 20embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] }
20embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "tick-hz-32_768"] } 21embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "tick-hz-32_768"] }
21embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "memory-x", "time-driver-tim2"] } 22embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "memory-x", "time-driver-any"] }
22 23
23defmt = "0.3.0" 24defmt = "0.3.0"
24defmt-rtt = "0.4" 25defmt-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);