diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-06-09 14:55:50 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-06-09 14:55:50 +0000 |
| commit | ab86b060500ceda1c80e39f35af69cb08a7b63a2 (patch) | |
| tree | 0fba68cd90fedc5233f3d7621df50f12ed28584a | |
| parent | 479ccf17df01e9ec6095bb228b198b628697987c (diff) | |
| parent | 6653f262d7c2ec17e6aba91b89d3835504320a5a (diff) | |
Merge pull request #1548 from embassy-rs/crate-cleanup
Crate cleanups
55 files changed, 96 insertions, 388 deletions
diff --git a/.github/ci/doc.sh b/.github/ci/doc.sh index 736249368..72c6465f7 100755 --- a/.github/ci/doc.sh +++ b/.github/ci/doc.sh | |||
| @@ -14,7 +14,6 @@ docserver-builder -i ./embassy-boot/boot -o crates/embassy-boot/git.zup | |||
| 14 | docserver-builder -i ./embassy-boot/nrf -o crates/embassy-boot-nrf/git.zup | 14 | docserver-builder -i ./embassy-boot/nrf -o crates/embassy-boot-nrf/git.zup |
| 15 | docserver-builder -i ./embassy-boot/rp -o crates/embassy-boot-rp/git.zup | 15 | docserver-builder -i ./embassy-boot/rp -o crates/embassy-boot-rp/git.zup |
| 16 | docserver-builder -i ./embassy-boot/stm32 -o crates/embassy-boot-stm32/git.zup | 16 | docserver-builder -i ./embassy-boot/stm32 -o crates/embassy-boot-stm32/git.zup |
| 17 | docserver-builder -i ./embassy-cortex-m -o crates/embassy-cortex-m/git.zup | ||
| 18 | docserver-builder -i ./embassy-embedded-hal -o crates/embassy-embedded-hal/git.zup | 17 | docserver-builder -i ./embassy-embedded-hal -o crates/embassy-embedded-hal/git.zup |
| 19 | docserver-builder -i ./embassy-executor -o crates/embassy-executor/git.zup | 18 | docserver-builder -i ./embassy-executor -o crates/embassy-executor/git.zup |
| 20 | docserver-builder -i ./embassy-futures -o crates/embassy-futures/git.zup | 19 | docserver-builder -i ./embassy-futures -o crates/embassy-futures/git.zup |
diff --git a/embassy-cortex-m/Cargo.toml b/embassy-cortex-m/Cargo.toml deleted file mode 100644 index 70adda7df..000000000 --- a/embassy-cortex-m/Cargo.toml +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | [package] | ||
| 2 | name = "embassy-cortex-m" | ||
| 3 | version = "0.1.0" | ||
| 4 | edition = "2021" | ||
| 5 | license = "MIT OR Apache-2.0" | ||
| 6 | |||
| 7 | [package.metadata.embassy_docs] | ||
| 8 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-cortex-m-v$VERSION/embassy-cortex-m/src/" | ||
| 9 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-cortex-m/src/" | ||
| 10 | features = ["prio-bits-3"] | ||
| 11 | flavors = [ | ||
| 12 | { name = "thumbv6m-none-eabi", target = "thumbv6m-none-eabi", features = [] }, | ||
| 13 | { name = "thumbv7m-none-eabi", target = "thumbv7m-none-eabi", features = [] }, | ||
| 14 | { name = "thumbv7em-none-eabi", target = "thumbv7em-none-eabi", features = [] }, | ||
| 15 | { name = "thumbv7em-none-eabihf", target = "thumbv7em-none-eabihf", features = [] }, | ||
| 16 | { name = "thumbv8m.main-none-eabihf", target = "thumbv8m.main-none-eabihf", features = [] }, | ||
| 17 | ] | ||
| 18 | |||
| 19 | [features] | ||
| 20 | default = [] | ||
| 21 | |||
| 22 | # Define the number of NVIC priority bits. | ||
| 23 | prio-bits-0 = [] | ||
| 24 | prio-bits-1 = [] | ||
| 25 | prio-bits-2 = [] | ||
| 26 | prio-bits-3 = [] | ||
| 27 | prio-bits-4 = [] | ||
| 28 | prio-bits-5 = [] | ||
| 29 | prio-bits-6 = [] | ||
| 30 | prio-bits-7 = [] | ||
| 31 | prio-bits-8 = [] | ||
| 32 | |||
| 33 | [dependencies] | ||
| 34 | defmt = { version = "0.3", optional = true } | ||
| 35 | log = { version = "0.4.14", optional = true } | ||
| 36 | |||
| 37 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } | ||
| 38 | embassy-executor = { version = "0.2.0", path = "../embassy-executor"} | ||
| 39 | embassy-macros = { version = "0.2.0", path = "../embassy-macros"} | ||
| 40 | embassy-hal-common = { version = "0.1.0", path = "../embassy-hal-common"} | ||
| 41 | atomic-polyfill = "1.0.1" | ||
| 42 | critical-section = "1.1" | ||
| 43 | cfg-if = "1.0.0" | ||
| 44 | cortex-m = "0.7.6" | ||
| 45 | |||
diff --git a/embassy-cortex-m/src/fmt.rs b/embassy-cortex-m/src/fmt.rs deleted file mode 100644 index 066970813..000000000 --- a/embassy-cortex-m/src/fmt.rs +++ /dev/null | |||
| @@ -1,225 +0,0 @@ | |||
| 1 | #![macro_use] | ||
| 2 | #![allow(unused_macros)] | ||
| 3 | |||
| 4 | #[cfg(all(feature = "defmt", feature = "log"))] | ||
| 5 | compile_error!("You may not enable both `defmt` and `log` features."); | ||
| 6 | |||
| 7 | macro_rules! assert { | ||
| 8 | ($($x:tt)*) => { | ||
| 9 | { | ||
| 10 | #[cfg(not(feature = "defmt"))] | ||
| 11 | ::core::assert!($($x)*); | ||
| 12 | #[cfg(feature = "defmt")] | ||
| 13 | ::defmt::assert!($($x)*); | ||
| 14 | } | ||
| 15 | }; | ||
| 16 | } | ||
| 17 | |||
| 18 | macro_rules! assert_eq { | ||
| 19 | ($($x:tt)*) => { | ||
| 20 | { | ||
| 21 | #[cfg(not(feature = "defmt"))] | ||
| 22 | ::core::assert_eq!($($x)*); | ||
| 23 | #[cfg(feature = "defmt")] | ||
| 24 | ::defmt::assert_eq!($($x)*); | ||
| 25 | } | ||
| 26 | }; | ||
| 27 | } | ||
| 28 | |||
| 29 | macro_rules! assert_ne { | ||
| 30 | ($($x:tt)*) => { | ||
| 31 | { | ||
| 32 | #[cfg(not(feature = "defmt"))] | ||
| 33 | ::core::assert_ne!($($x)*); | ||
| 34 | #[cfg(feature = "defmt")] | ||
| 35 | ::defmt::assert_ne!($($x)*); | ||
| 36 | } | ||
| 37 | }; | ||
| 38 | } | ||
| 39 | |||
| 40 | macro_rules! debug_assert { | ||
| 41 | ($($x:tt)*) => { | ||
| 42 | { | ||
| 43 | #[cfg(not(feature = "defmt"))] | ||
| 44 | ::core::debug_assert!($($x)*); | ||
| 45 | #[cfg(feature = "defmt")] | ||
| 46 | ::defmt::debug_assert!($($x)*); | ||
| 47 | } | ||
| 48 | }; | ||
| 49 | } | ||
| 50 | |||
| 51 | macro_rules! debug_assert_eq { | ||
| 52 | ($($x:tt)*) => { | ||
| 53 | { | ||
| 54 | #[cfg(not(feature = "defmt"))] | ||
| 55 | ::core::debug_assert_eq!($($x)*); | ||
| 56 | #[cfg(feature = "defmt")] | ||
| 57 | ::defmt::debug_assert_eq!($($x)*); | ||
| 58 | } | ||
| 59 | }; | ||
| 60 | } | ||
| 61 | |||
| 62 | macro_rules! debug_assert_ne { | ||
| 63 | ($($x:tt)*) => { | ||
| 64 | { | ||
| 65 | #[cfg(not(feature = "defmt"))] | ||
| 66 | ::core::debug_assert_ne!($($x)*); | ||
| 67 | #[cfg(feature = "defmt")] | ||
| 68 | ::defmt::debug_assert_ne!($($x)*); | ||
| 69 | } | ||
| 70 | }; | ||
| 71 | } | ||
| 72 | |||
| 73 | macro_rules! todo { | ||
| 74 | ($($x:tt)*) => { | ||
| 75 | { | ||
| 76 | #[cfg(not(feature = "defmt"))] | ||
| 77 | ::core::todo!($($x)*); | ||
| 78 | #[cfg(feature = "defmt")] | ||
| 79 | ::defmt::todo!($($x)*); | ||
| 80 | } | ||
| 81 | }; | ||
| 82 | } | ||
| 83 | |||
| 84 | macro_rules! unreachable { | ||
| 85 | ($($x:tt)*) => { | ||
| 86 | { | ||
| 87 | #[cfg(not(feature = "defmt"))] | ||
| 88 | ::core::unreachable!($($x)*); | ||
| 89 | #[cfg(feature = "defmt")] | ||
| 90 | ::defmt::unreachable!($($x)*); | ||
| 91 | } | ||
| 92 | }; | ||
| 93 | } | ||
| 94 | |||
| 95 | macro_rules! panic { | ||
| 96 | ($($x:tt)*) => { | ||
| 97 | { | ||
| 98 | #[cfg(not(feature = "defmt"))] | ||
| 99 | ::core::panic!($($x)*); | ||
| 100 | #[cfg(feature = "defmt")] | ||
| 101 | ::defmt::panic!($($x)*); | ||
| 102 | } | ||
| 103 | }; | ||
| 104 | } | ||
| 105 | |||
| 106 | macro_rules! trace { | ||
| 107 | ($s:literal $(, $x:expr)* $(,)?) => { | ||
| 108 | { | ||
| 109 | #[cfg(feature = "log")] | ||
| 110 | ::log::trace!($s $(, $x)*); | ||
| 111 | #[cfg(feature = "defmt")] | ||
| 112 | ::defmt::trace!($s $(, $x)*); | ||
| 113 | #[cfg(not(any(feature = "log", feature="defmt")))] | ||
| 114 | let _ = ($( & $x ),*); | ||
| 115 | } | ||
| 116 | }; | ||
| 117 | } | ||
| 118 | |||
| 119 | macro_rules! debug { | ||
| 120 | ($s:literal $(, $x:expr)* $(,)?) => { | ||
| 121 | { | ||
| 122 | #[cfg(feature = "log")] | ||
| 123 | ::log::debug!($s $(, $x)*); | ||
| 124 | #[cfg(feature = "defmt")] | ||
| 125 | ::defmt::debug!($s $(, $x)*); | ||
| 126 | #[cfg(not(any(feature = "log", feature="defmt")))] | ||
| 127 | let _ = ($( & $x ),*); | ||
| 128 | } | ||
| 129 | }; | ||
| 130 | } | ||
| 131 | |||
| 132 | macro_rules! info { | ||
| 133 | ($s:literal $(, $x:expr)* $(,)?) => { | ||
| 134 | { | ||
| 135 | #[cfg(feature = "log")] | ||
| 136 | ::log::info!($s $(, $x)*); | ||
| 137 | #[cfg(feature = "defmt")] | ||
| 138 | ::defmt::info!($s $(, $x)*); | ||
| 139 | #[cfg(not(any(feature = "log", feature="defmt")))] | ||
| 140 | let _ = ($( & $x ),*); | ||
| 141 | } | ||
| 142 | }; | ||
| 143 | } | ||
| 144 | |||
| 145 | macro_rules! warn { | ||
| 146 | ($s:literal $(, $x:expr)* $(,)?) => { | ||
| 147 | { | ||
| 148 | #[cfg(feature = "log")] | ||
| 149 | ::log::warn!($s $(, $x)*); | ||
| 150 | #[cfg(feature = "defmt")] | ||
| 151 | ::defmt::warn!($s $(, $x)*); | ||
| 152 | #[cfg(not(any(feature = "log", feature="defmt")))] | ||
| 153 | let _ = ($( & $x ),*); | ||
| 154 | } | ||
| 155 | }; | ||
| 156 | } | ||
| 157 | |||
| 158 | macro_rules! error { | ||
| 159 | ($s:literal $(, $x:expr)* $(,)?) => { | ||
| 160 | { | ||
| 161 | #[cfg(feature = "log")] | ||
| 162 | ::log::error!($s $(, $x)*); | ||
| 163 | #[cfg(feature = "defmt")] | ||
| 164 | ::defmt::error!($s $(, $x)*); | ||
| 165 | #[cfg(not(any(feature = "log", feature="defmt")))] | ||
| 166 | let _ = ($( & $x ),*); | ||
| 167 | } | ||
| 168 | }; | ||
| 169 | } | ||
| 170 | |||
| 171 | #[cfg(feature = "defmt")] | ||
| 172 | macro_rules! unwrap { | ||
| 173 | ($($x:tt)*) => { | ||
| 174 | ::defmt::unwrap!($($x)*) | ||
| 175 | }; | ||
| 176 | } | ||
| 177 | |||
| 178 | #[cfg(not(feature = "defmt"))] | ||
| 179 | macro_rules! unwrap { | ||
| 180 | ($arg:expr) => { | ||
| 181 | match $crate::fmt::Try::into_result($arg) { | ||
| 182 | ::core::result::Result::Ok(t) => t, | ||
| 183 | ::core::result::Result::Err(e) => { | ||
| 184 | ::core::panic!("unwrap of `{}` failed: {:?}", ::core::stringify!($arg), e); | ||
| 185 | } | ||
| 186 | } | ||
| 187 | }; | ||
| 188 | ($arg:expr, $($msg:expr),+ $(,)? ) => { | ||
| 189 | match $crate::fmt::Try::into_result($arg) { | ||
| 190 | ::core::result::Result::Ok(t) => t, | ||
| 191 | ::core::result::Result::Err(e) => { | ||
| 192 | ::core::panic!("unwrap of `{}` failed: {}: {:?}", ::core::stringify!($arg), ::core::format_args!($($msg,)*), e); | ||
| 193 | } | ||
| 194 | } | ||
| 195 | } | ||
| 196 | } | ||
| 197 | |||
| 198 | #[derive(Debug, Copy, Clone, Eq, PartialEq)] | ||
| 199 | pub struct NoneError; | ||
| 200 | |||
| 201 | pub trait Try { | ||
| 202 | type Ok; | ||
| 203 | type Error; | ||
| 204 | fn into_result(self) -> Result<Self::Ok, Self::Error>; | ||
| 205 | } | ||
| 206 | |||
| 207 | impl<T> Try for Option<T> { | ||
| 208 | type Ok = T; | ||
| 209 | type Error = NoneError; | ||
| 210 | |||
| 211 | #[inline] | ||
| 212 | fn into_result(self) -> Result<T, NoneError> { | ||
| 213 | self.ok_or(NoneError) | ||
| 214 | } | ||
| 215 | } | ||
| 216 | |||
| 217 | impl<T, E> Try for Result<T, E> { | ||
| 218 | type Ok = T; | ||
| 219 | type Error = E; | ||
| 220 | |||
| 221 | #[inline] | ||
| 222 | fn into_result(self) -> Self { | ||
| 223 | self | ||
| 224 | } | ||
| 225 | } | ||
diff --git a/embassy-cortex-m/src/lib.rs b/embassy-cortex-m/src/lib.rs deleted file mode 100644 index 7bc16d3ba..000000000 --- a/embassy-cortex-m/src/lib.rs +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | //! Embassy executor and interrupt handling specific to cortex-m devices. | ||
| 2 | #![no_std] | ||
| 3 | #![warn(missing_docs)] | ||
| 4 | |||
| 5 | // This mod MUST go first, so that the others see its macros. | ||
| 6 | pub(crate) mod fmt; | ||
| 7 | |||
| 8 | pub use embassy_executor as executor; | ||
| 9 | pub mod interrupt; | ||
diff --git a/embassy-hal-common/Cargo.toml b/embassy-hal-common/Cargo.toml index e8617c02f..18c758d7b 100644 --- a/embassy-hal-common/Cargo.toml +++ b/embassy-hal-common/Cargo.toml | |||
| @@ -6,8 +6,24 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [features] | 7 | [features] |
| 8 | 8 | ||
| 9 | # Define the number of NVIC priority bits. | ||
| 10 | prio-bits-0 = [] | ||
| 11 | prio-bits-1 = [] | ||
| 12 | prio-bits-2 = [] | ||
| 13 | prio-bits-3 = [] | ||
| 14 | prio-bits-4 = [] | ||
| 15 | prio-bits-5 = [] | ||
| 16 | prio-bits-6 = [] | ||
| 17 | prio-bits-7 = [] | ||
| 18 | prio-bits-8 = [] | ||
| 19 | |||
| 20 | cortex-m = ["dep:cortex-m", "dep:critical-section"] | ||
| 21 | |||
| 9 | [dependencies] | 22 | [dependencies] |
| 10 | defmt = { version = "0.3", optional = true } | 23 | defmt = { version = "0.3", optional = true } |
| 11 | log = { version = "0.4.14", optional = true } | 24 | log = { version = "0.4.14", optional = true } |
| 12 | 25 | ||
| 13 | num-traits = { version = "0.2.14", default-features = false } | 26 | num-traits = { version = "0.2.14", default-features = false } |
| 27 | |||
| 28 | cortex-m = { version = "0.7.6", optional = true } | ||
| 29 | critical-section = { version = "1", optional = true } \ No newline at end of file | ||
diff --git a/embassy-cortex-m/build.rs b/embassy-hal-common/build.rs index 6fe82b44f..6fe82b44f 100644 --- a/embassy-cortex-m/build.rs +++ b/embassy-hal-common/build.rs | |||
diff --git a/embassy-cortex-m/src/interrupt.rs b/embassy-hal-common/src/interrupt.rs index e9fa43e87..b970aa2cd 100644 --- a/embassy-cortex-m/src/interrupt.rs +++ b/embassy-hal-common/src/interrupt.rs | |||
| @@ -14,7 +14,7 @@ macro_rules! interrupt_mod { | |||
| 14 | 14 | ||
| 15 | /// Interrupt definitions. | 15 | /// Interrupt definitions. |
| 16 | pub mod interrupt { | 16 | pub mod interrupt { |
| 17 | pub use embassy_cortex_m::interrupt::{InterruptExt, Priority}; | 17 | pub use $crate::interrupt::{InterruptExt, Priority}; |
| 18 | pub use crate::pac::Interrupt::*; | 18 | pub use crate::pac::Interrupt::*; |
| 19 | pub use crate::pac::Interrupt; | 19 | pub use crate::pac::Interrupt; |
| 20 | 20 | ||
diff --git a/embassy-hal-common/src/lib.rs b/embassy-hal-common/src/lib.rs index b2a35cd35..235964aa4 100644 --- a/embassy-hal-common/src/lib.rs +++ b/embassy-hal-common/src/lib.rs | |||
| @@ -11,3 +11,6 @@ mod peripheral; | |||
| 11 | pub mod ratio; | 11 | pub mod ratio; |
| 12 | pub mod ring_buffer; | 12 | pub mod ring_buffer; |
| 13 | pub use peripheral::{Peripheral, PeripheralRef}; | 13 | pub use peripheral::{Peripheral, PeripheralRef}; |
| 14 | |||
| 15 | #[cfg(feature = "cortex-m")] | ||
| 16 | pub mod interrupt; | ||
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index 5fab11f37..3e858f854 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml | |||
| @@ -32,7 +32,7 @@ rt = [ | |||
| 32 | 32 | ||
| 33 | time = ["dep:embassy-time"] | 33 | time = ["dep:embassy-time"] |
| 34 | 34 | ||
| 35 | defmt = ["dep:defmt", "embassy-executor/defmt", "embassy-sync/defmt", "embassy-usb-driver?/defmt", "embedded-io?/defmt", "embassy-embedded-hal/defmt"] | 35 | defmt = ["dep:defmt", "embassy-sync/defmt", "embassy-usb-driver?/defmt", "embedded-io?/defmt", "embassy-embedded-hal/defmt"] |
| 36 | 36 | ||
| 37 | # Enable nightly-only features | 37 | # Enable nightly-only features |
| 38 | nightly = ["embedded-hal-1", "embedded-hal-async", "dep:embassy-usb-driver", "embedded-storage-async", "dep:embedded-io", "embassy-embedded-hal/nightly"] | 38 | nightly = ["embedded-hal-1", "embedded-hal-async", "dep:embassy-usb-driver", "embedded-storage-async", "dep:embedded-io", "embassy-embedded-hal/nightly"] |
| @@ -91,11 +91,9 @@ _dppi = [] | |||
| 91 | _gpio-p1 = [] | 91 | _gpio-p1 = [] |
| 92 | 92 | ||
| 93 | [dependencies] | 93 | [dependencies] |
| 94 | embassy-executor = { version = "0.2.0", path = "../embassy-executor", optional = true } | ||
| 95 | embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true } | 94 | embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true } |
| 96 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } | 95 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } |
| 97 | embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-3"]} | 96 | embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common", features = ["cortex-m", "prio-bits-3"] } |
| 98 | embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } | ||
| 99 | embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } | 97 | embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } |
| 100 | embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional=true } | 98 | embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional=true } |
| 101 | 99 | ||
diff --git a/embassy-nrf/src/chips/nrf52805.rs b/embassy-nrf/src/chips/nrf52805.rs index 8fbd760dc..8776000c8 100644 --- a/embassy-nrf/src/chips/nrf52805.rs +++ b/embassy-nrf/src/chips/nrf52805.rs | |||
| @@ -208,7 +208,7 @@ impl_ppi_channel!(PPI_CH31, 31 => static); | |||
| 208 | impl_saadc_input!(P0_04, ANALOG_INPUT2); | 208 | impl_saadc_input!(P0_04, ANALOG_INPUT2); |
| 209 | impl_saadc_input!(P0_05, ANALOG_INPUT3); | 209 | impl_saadc_input!(P0_05, ANALOG_INPUT3); |
| 210 | 210 | ||
| 211 | embassy_cortex_m::interrupt_mod!( | 211 | embassy_hal_common::interrupt_mod!( |
| 212 | POWER_CLOCK, | 212 | POWER_CLOCK, |
| 213 | RADIO, | 213 | RADIO, |
| 214 | UARTE0_UART0, | 214 | UARTE0_UART0, |
diff --git a/embassy-nrf/src/chips/nrf52810.rs b/embassy-nrf/src/chips/nrf52810.rs index bbf8f7ccf..5519e8953 100644 --- a/embassy-nrf/src/chips/nrf52810.rs +++ b/embassy-nrf/src/chips/nrf52810.rs | |||
| @@ -234,7 +234,7 @@ impl_saadc_input!(P0_29, ANALOG_INPUT5); | |||
| 234 | impl_saadc_input!(P0_30, ANALOG_INPUT6); | 234 | impl_saadc_input!(P0_30, ANALOG_INPUT6); |
| 235 | impl_saadc_input!(P0_31, ANALOG_INPUT7); | 235 | impl_saadc_input!(P0_31, ANALOG_INPUT7); |
| 236 | 236 | ||
| 237 | embassy_cortex_m::interrupt_mod!( | 237 | embassy_hal_common::interrupt_mod!( |
| 238 | POWER_CLOCK, | 238 | POWER_CLOCK, |
| 239 | RADIO, | 239 | RADIO, |
| 240 | UARTE0_UART0, | 240 | UARTE0_UART0, |
diff --git a/embassy-nrf/src/chips/nrf52811.rs b/embassy-nrf/src/chips/nrf52811.rs index 31a8dd6af..d5367c59a 100644 --- a/embassy-nrf/src/chips/nrf52811.rs +++ b/embassy-nrf/src/chips/nrf52811.rs | |||
| @@ -236,7 +236,7 @@ impl_saadc_input!(P0_29, ANALOG_INPUT5); | |||
| 236 | impl_saadc_input!(P0_30, ANALOG_INPUT6); | 236 | impl_saadc_input!(P0_30, ANALOG_INPUT6); |
| 237 | impl_saadc_input!(P0_31, ANALOG_INPUT7); | 237 | impl_saadc_input!(P0_31, ANALOG_INPUT7); |
| 238 | 238 | ||
| 239 | embassy_cortex_m::interrupt_mod!( | 239 | embassy_hal_common::interrupt_mod!( |
| 240 | POWER_CLOCK, | 240 | POWER_CLOCK, |
| 241 | RADIO, | 241 | RADIO, |
| 242 | UARTE0_UART0, | 242 | UARTE0_UART0, |
diff --git a/embassy-nrf/src/chips/nrf52820.rs b/embassy-nrf/src/chips/nrf52820.rs index 6a6f4fcf2..785170447 100644 --- a/embassy-nrf/src/chips/nrf52820.rs +++ b/embassy-nrf/src/chips/nrf52820.rs | |||
| @@ -224,7 +224,7 @@ impl_ppi_channel!(PPI_CH29, 29 => static); | |||
| 224 | impl_ppi_channel!(PPI_CH30, 30 => static); | 224 | impl_ppi_channel!(PPI_CH30, 30 => static); |
| 225 | impl_ppi_channel!(PPI_CH31, 31 => static); | 225 | impl_ppi_channel!(PPI_CH31, 31 => static); |
| 226 | 226 | ||
| 227 | embassy_cortex_m::interrupt_mod!( | 227 | embassy_hal_common::interrupt_mod!( |
| 228 | POWER_CLOCK, | 228 | POWER_CLOCK, |
| 229 | RADIO, | 229 | RADIO, |
| 230 | UARTE0_UART0, | 230 | UARTE0_UART0, |
diff --git a/embassy-nrf/src/chips/nrf52832.rs b/embassy-nrf/src/chips/nrf52832.rs index e43b3d5b2..b77564a5c 100644 --- a/embassy-nrf/src/chips/nrf52832.rs +++ b/embassy-nrf/src/chips/nrf52832.rs | |||
| @@ -263,7 +263,7 @@ impl_saadc_input!(P0_31, ANALOG_INPUT7); | |||
| 263 | 263 | ||
| 264 | impl_i2s!(I2S, I2S, I2S); | 264 | impl_i2s!(I2S, I2S, I2S); |
| 265 | 265 | ||
| 266 | embassy_cortex_m::interrupt_mod!( | 266 | embassy_hal_common::interrupt_mod!( |
| 267 | POWER_CLOCK, | 267 | POWER_CLOCK, |
| 268 | RADIO, | 268 | RADIO, |
| 269 | UARTE0_UART0, | 269 | UARTE0_UART0, |
diff --git a/embassy-nrf/src/chips/nrf52833.rs b/embassy-nrf/src/chips/nrf52833.rs index d95e3497c..bff7f4ebb 100644 --- a/embassy-nrf/src/chips/nrf52833.rs +++ b/embassy-nrf/src/chips/nrf52833.rs | |||
| @@ -306,7 +306,7 @@ impl_saadc_input!(P0_31, ANALOG_INPUT7); | |||
| 306 | 306 | ||
| 307 | impl_i2s!(I2S, I2S, I2S); | 307 | impl_i2s!(I2S, I2S, I2S); |
| 308 | 308 | ||
| 309 | embassy_cortex_m::interrupt_mod!( | 309 | embassy_hal_common::interrupt_mod!( |
| 310 | POWER_CLOCK, | 310 | POWER_CLOCK, |
| 311 | RADIO, | 311 | RADIO, |
| 312 | UARTE0_UART0, | 312 | UARTE0_UART0, |
diff --git a/embassy-nrf/src/chips/nrf52840.rs b/embassy-nrf/src/chips/nrf52840.rs index 0094b1220..9b0050823 100644 --- a/embassy-nrf/src/chips/nrf52840.rs +++ b/embassy-nrf/src/chips/nrf52840.rs | |||
| @@ -311,7 +311,7 @@ impl_saadc_input!(P0_31, ANALOG_INPUT7); | |||
| 311 | 311 | ||
| 312 | impl_i2s!(I2S, I2S, I2S); | 312 | impl_i2s!(I2S, I2S, I2S); |
| 313 | 313 | ||
| 314 | embassy_cortex_m::interrupt_mod!( | 314 | embassy_hal_common::interrupt_mod!( |
| 315 | POWER_CLOCK, | 315 | POWER_CLOCK, |
| 316 | RADIO, | 316 | RADIO, |
| 317 | UARTE0_UART0, | 317 | UARTE0_UART0, |
diff --git a/embassy-nrf/src/chips/nrf5340_app.rs b/embassy-nrf/src/chips/nrf5340_app.rs index cb879f736..410ae921c 100644 --- a/embassy-nrf/src/chips/nrf5340_app.rs +++ b/embassy-nrf/src/chips/nrf5340_app.rs | |||
| @@ -506,7 +506,7 @@ impl_saadc_input!(P0_18, ANALOG_INPUT5); | |||
| 506 | impl_saadc_input!(P0_19, ANALOG_INPUT6); | 506 | impl_saadc_input!(P0_19, ANALOG_INPUT6); |
| 507 | impl_saadc_input!(P0_20, ANALOG_INPUT7); | 507 | impl_saadc_input!(P0_20, ANALOG_INPUT7); |
| 508 | 508 | ||
| 509 | embassy_cortex_m::interrupt_mod!( | 509 | embassy_hal_common::interrupt_mod!( |
| 510 | FPU, | 510 | FPU, |
| 511 | CACHE, | 511 | CACHE, |
| 512 | SPU, | 512 | SPU, |
diff --git a/embassy-nrf/src/chips/nrf5340_net.rs b/embassy-nrf/src/chips/nrf5340_net.rs index 6e2c0bb67..6ac783085 100644 --- a/embassy-nrf/src/chips/nrf5340_net.rs +++ b/embassy-nrf/src/chips/nrf5340_net.rs | |||
| @@ -342,7 +342,7 @@ impl_ppi_channel!(PPI_CH29, 29 => configurable); | |||
| 342 | impl_ppi_channel!(PPI_CH30, 30 => configurable); | 342 | impl_ppi_channel!(PPI_CH30, 30 => configurable); |
| 343 | impl_ppi_channel!(PPI_CH31, 31 => configurable); | 343 | impl_ppi_channel!(PPI_CH31, 31 => configurable); |
| 344 | 344 | ||
| 345 | embassy_cortex_m::interrupt_mod!( | 345 | embassy_hal_common::interrupt_mod!( |
| 346 | CLOCK_POWER, | 346 | CLOCK_POWER, |
| 347 | RADIO, | 347 | RADIO, |
| 348 | RNG, | 348 | RNG, |
diff --git a/embassy-nrf/src/chips/nrf9160.rs b/embassy-nrf/src/chips/nrf9160.rs index 9944ac4af..67ea032ff 100644 --- a/embassy-nrf/src/chips/nrf9160.rs +++ b/embassy-nrf/src/chips/nrf9160.rs | |||
| @@ -368,7 +368,7 @@ impl_saadc_input!(P0_18, ANALOG_INPUT5); | |||
| 368 | impl_saadc_input!(P0_19, ANALOG_INPUT6); | 368 | impl_saadc_input!(P0_19, ANALOG_INPUT6); |
| 369 | impl_saadc_input!(P0_20, ANALOG_INPUT7); | 369 | impl_saadc_input!(P0_20, ANALOG_INPUT7); |
| 370 | 370 | ||
| 371 | embassy_cortex_m::interrupt_mod!( | 371 | embassy_hal_common::interrupt_mod!( |
| 372 | SPU, | 372 | SPU, |
| 373 | CLOCK_POWER, | 373 | CLOCK_POWER, |
| 374 | UARTE0_SPIM0_SPIS0_TWIM0_TWIS0, | 374 | UARTE0_SPIM0_SPIS0_TWIM0_TWIS0, |
diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs index ddabf93a9..691545662 100644 --- a/embassy-nrf/src/lib.rs +++ b/embassy-nrf/src/lib.rs | |||
| @@ -98,7 +98,7 @@ mod chip; | |||
| 98 | /// This defines the right interrupt handlers, and creates a unit struct (like `struct Irqs;`) | 98 | /// This defines the right interrupt handlers, and creates a unit struct (like `struct Irqs;`) |
| 99 | /// and implements the right [`Binding`]s for it. You can pass this struct to drivers to | 99 | /// and implements the right [`Binding`]s for it. You can pass this struct to drivers to |
| 100 | /// prove at compile-time that the right interrupts have been bound. | 100 | /// prove at compile-time that the right interrupts have been bound. |
| 101 | // developer note: this macro can't be in `embassy-cortex-m` due to the use of `$crate`. | 101 | // developer note: this macro can't be in `embassy-hal-common` due to the use of `$crate`. |
| 102 | #[macro_export] | 102 | #[macro_export] |
| 103 | macro_rules! bind_interrupts { | 103 | macro_rules! bind_interrupts { |
| 104 | ($vis:vis struct $name:ident { $($irq:ident => $($handler:ty),*;)* }) => { | 104 | ($vis:vis struct $name:ident { $($irq:ident => $($handler:ty),*;)* }) => { |
| @@ -127,7 +127,6 @@ pub use chip::pac; | |||
| 127 | #[cfg(not(feature = "unstable-pac"))] | 127 | #[cfg(not(feature = "unstable-pac"))] |
| 128 | pub(crate) use chip::pac; | 128 | pub(crate) use chip::pac; |
| 129 | pub use chip::{peripherals, Peripherals, EASY_DMA_SIZE}; | 129 | pub use chip::{peripherals, Peripherals, EASY_DMA_SIZE}; |
| 130 | pub use embassy_cortex_m::executor; | ||
| 131 | pub use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; | 130 | pub use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; |
| 132 | 131 | ||
| 133 | pub use crate::chip::interrupt; | 132 | pub use crate::chip::interrupt; |
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index ee06e99ce..b68f95385 100644 --- a/embassy-rp/Cargo.toml +++ b/embassy-rp/Cargo.toml | |||
| @@ -48,7 +48,7 @@ boot2-w25x10cl = [] | |||
| 48 | run-from-ram = [] | 48 | run-from-ram = [] |
| 49 | 49 | ||
| 50 | # Enable nightly-only features | 50 | # Enable nightly-only features |
| 51 | nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "embassy-embedded-hal/nightly", "dep:embassy-usb-driver", "dep:embedded-io"] | 51 | nightly = ["embedded-hal-1", "embedded-hal-async", "embassy-embedded-hal/nightly", "dep:embassy-usb-driver", "dep:embedded-io"] |
| 52 | 52 | ||
| 53 | # Implement embedded-hal 1.0 alpha traits. | 53 | # Implement embedded-hal 1.0 alpha traits. |
| 54 | # Implement embedded-hal-async traits if `nightly` is set as well. | 54 | # Implement embedded-hal-async traits if `nightly` is set as well. |
| @@ -56,11 +56,9 @@ unstable-traits = ["embedded-hal-1", "embedded-hal-nb"] | |||
| 56 | 56 | ||
| 57 | [dependencies] | 57 | [dependencies] |
| 58 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } | 58 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } |
| 59 | embassy-executor = { version = "0.2.0", path = "../embassy-executor" } | ||
| 60 | embassy-time = { version = "0.1.0", path = "../embassy-time", features = [ "tick-hz-1_000_000" ] } | 59 | embassy-time = { version = "0.1.0", path = "../embassy-time", features = [ "tick-hz-1_000_000" ] } |
| 61 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 60 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| 62 | embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-2"]} | 61 | embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common", features = ["cortex-m", "prio-bits-2"] } |
| 63 | embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } | ||
| 64 | embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } | 62 | embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } |
| 65 | embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional = true } | 63 | embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional = true } |
| 66 | atomic-polyfill = "1.0.1" | 64 | atomic-polyfill = "1.0.1" |
| @@ -91,5 +89,5 @@ pio = {version= "0.2.1" } | |||
| 91 | rp2040-boot2 = "0.3" | 89 | rp2040-boot2 = "0.3" |
| 92 | 90 | ||
| 93 | [dev-dependencies] | 91 | [dev-dependencies] |
| 94 | embassy-executor = { version = "0.2.0", path = "../embassy-executor", features = ["arch-std", "executor-thread"] } | 92 | embassy-executor = { version = "0.2.0", path = "../embassy-executor", features = ["nightly", "arch-std", "executor-thread"] } |
| 95 | static_cell = "1.1" | 93 | static_cell = "1.1" |
diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs index 4e4b76141..d6f73219f 100644 --- a/embassy-rp/src/lib.rs +++ b/embassy-rp/src/lib.rs | |||
| @@ -36,7 +36,6 @@ pub mod pio_instr_util; | |||
| 36 | pub mod relocate; | 36 | pub mod relocate; |
| 37 | 37 | ||
| 38 | // Reexports | 38 | // Reexports |
| 39 | pub use embassy_cortex_m::executor; | ||
| 40 | pub use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; | 39 | pub use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; |
| 41 | #[cfg(feature = "unstable-pac")] | 40 | #[cfg(feature = "unstable-pac")] |
| 42 | pub use rp_pac as pac; | 41 | pub use rp_pac as pac; |
| @@ -46,7 +45,7 @@ pub(crate) use rp_pac as pac; | |||
| 46 | #[cfg(feature = "rt")] | 45 | #[cfg(feature = "rt")] |
| 47 | pub use crate::pac::NVIC_PRIO_BITS; | 46 | pub use crate::pac::NVIC_PRIO_BITS; |
| 48 | 47 | ||
| 49 | embassy_cortex_m::interrupt_mod!( | 48 | embassy_hal_common::interrupt_mod!( |
| 50 | TIMER_IRQ_0, | 49 | TIMER_IRQ_0, |
| 51 | TIMER_IRQ_1, | 50 | TIMER_IRQ_1, |
| 52 | TIMER_IRQ_2, | 51 | TIMER_IRQ_2, |
| @@ -86,7 +85,7 @@ embassy_cortex_m::interrupt_mod!( | |||
| 86 | /// This defines the right interrupt handlers, and creates a unit struct (like `struct Irqs;`) | 85 | /// This defines the right interrupt handlers, and creates a unit struct (like `struct Irqs;`) |
| 87 | /// and implements the right [`Binding`]s for it. You can pass this struct to drivers to | 86 | /// and implements the right [`Binding`]s for it. You can pass this struct to drivers to |
| 88 | /// prove at compile-time that the right interrupts have been bound. | 87 | /// prove at compile-time that the right interrupts have been bound. |
| 89 | // developer note: this macro can't be in `embassy-cortex-m` due to the use of `$crate`. | 88 | // developer note: this macro can't be in `embassy-hal-common` due to the use of `$crate`. |
| 90 | #[macro_export] | 89 | #[macro_export] |
| 91 | macro_rules! bind_interrupts { | 90 | macro_rules! bind_interrupts { |
| 92 | ($vis:vis struct $name:ident { $($irq:ident => $($handler:ty),*;)* }) => { | 91 | ($vis:vis struct $name:ident { $($irq:ident => $($handler:ty),*;)* }) => { |
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index f1f894c6c..f876c7146 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml | |||
| @@ -32,11 +32,9 @@ flavors = [ | |||
| 32 | 32 | ||
| 33 | [dependencies] | 33 | [dependencies] |
| 34 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } | 34 | embassy-sync = { version = "0.2.0", path = "../embassy-sync" } |
| 35 | embassy-executor = { version = "0.2.0", path = "../embassy-executor" } | ||
| 36 | embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true } | 35 | embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true } |
| 37 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 36 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| 38 | embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-4"]} | 37 | embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common", features = ["cortex-m", "prio-bits-4"] } |
| 39 | embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } | ||
| 40 | embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } | 38 | embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } |
| 41 | embassy-net-driver = { version = "0.1.0", path = "../embassy-net-driver" } | 39 | embassy-net-driver = { version = "0.1.0", path = "../embassy-net-driver" } |
| 42 | embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional = true } | 40 | embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional = true } |
| @@ -82,7 +80,7 @@ stm32-metapac = { version = "9", default-features = false, features = ["metadata | |||
| 82 | default = ["rt"] | 80 | default = ["rt"] |
| 83 | rt = ["stm32-metapac/rt"] | 81 | rt = ["stm32-metapac/rt"] |
| 84 | 82 | ||
| 85 | defmt = ["dep:defmt", "bxcan/unstable-defmt", "embassy-sync/defmt", "embassy-executor/defmt", "embassy-embedded-hal/defmt", "embassy-hal-common/defmt", "embedded-io?/defmt", "embassy-usb-driver?/defmt", "embassy-net-driver/defmt"] | 83 | defmt = ["dep:defmt", "bxcan/unstable-defmt", "embassy-sync/defmt", "embassy-embedded-hal/defmt", "embassy-hal-common/defmt", "embedded-io?/defmt", "embassy-usb-driver?/defmt", "embassy-net-driver/defmt"] |
| 86 | memory-x = ["stm32-metapac/memory-x"] | 84 | memory-x = ["stm32-metapac/memory-x"] |
| 87 | exti = [] | 85 | exti = [] |
| 88 | 86 | ||
| @@ -101,7 +99,7 @@ time-driver-tim12 = ["_time-driver"] | |||
| 101 | time-driver-tim15 = ["_time-driver"] | 99 | time-driver-tim15 = ["_time-driver"] |
| 102 | 100 | ||
| 103 | # Enable nightly-only features | 101 | # Enable nightly-only features |
| 104 | nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "dep:embedded-io", "dep:embassy-usb-driver", "embassy-embedded-hal/nightly"] | 102 | nightly = ["embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "dep:embedded-io", "dep:embassy-usb-driver", "embassy-embedded-hal/nightly"] |
| 105 | 103 | ||
| 106 | # Reexport stm32-metapac at `embassy_stm32::pac`. | 104 | # Reexport stm32-metapac at `embassy_stm32::pac`. |
| 107 | # This is unstable because semver-minor (non-breaking) releases of embassy-stm32 may major-bump (breaking) the stm32-metapac version. | 105 | # This is unstable because semver-minor (non-breaking) releases of embassy-stm32 may major-bump (breaking) the stm32-metapac version. |
diff --git a/embassy-stm32/build.rs b/embassy-stm32/build.rs index ba5f91ccf..9e597f187 100644 --- a/embassy-stm32/build.rs +++ b/embassy-stm32/build.rs | |||
| @@ -160,7 +160,7 @@ fn main() { | |||
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | g.extend(quote! { | 162 | g.extend(quote! { |
| 163 | embassy_cortex_m::interrupt_mod!( | 163 | embassy_hal_common::interrupt_mod!( |
| 164 | #( | 164 | #( |
| 165 | #irqs, | 165 | #irqs, |
| 166 | )* | 166 | )* |
diff --git a/embassy-stm32/src/dma/bdma.rs b/embassy-stm32/src/dma/bdma.rs index 83ab4b18f..c0a503e25 100644 --- a/embassy-stm32/src/dma/bdma.rs +++ b/embassy-stm32/src/dma/bdma.rs | |||
| @@ -6,7 +6,6 @@ use core::sync::atomic::{fence, Ordering}; | |||
| 6 | use core::task::{Context, Poll, Waker}; | 6 | use core::task::{Context, Poll, Waker}; |
| 7 | 7 | ||
| 8 | use atomic_polyfill::AtomicUsize; | 8 | use atomic_polyfill::AtomicUsize; |
| 9 | use embassy_cortex_m::interrupt::Priority; | ||
| 10 | use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; | 9 | use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; |
| 11 | use embassy_sync::waitqueue::AtomicWaker; | 10 | use embassy_sync::waitqueue::AtomicWaker; |
| 12 | 11 | ||
| @@ -15,6 +14,7 @@ use super::word::{Word, WordSize}; | |||
| 15 | use super::Dir; | 14 | use super::Dir; |
| 16 | use crate::_generated::BDMA_CHANNEL_COUNT; | 15 | use crate::_generated::BDMA_CHANNEL_COUNT; |
| 17 | use crate::interrupt::typelevel::Interrupt; | 16 | use crate::interrupt::typelevel::Interrupt; |
| 17 | use crate::interrupt::Priority; | ||
| 18 | use crate::pac; | 18 | use crate::pac; |
| 19 | use crate::pac::bdma::{regs, vals}; | 19 | use crate::pac::bdma::{regs, vals}; |
| 20 | 20 | ||
diff --git a/embassy-stm32/src/dma/dma.rs b/embassy-stm32/src/dma/dma.rs index 17313b310..874cb013a 100644 --- a/embassy-stm32/src/dma/dma.rs +++ b/embassy-stm32/src/dma/dma.rs | |||
| @@ -5,7 +5,6 @@ use core::sync::atomic::{fence, Ordering}; | |||
| 5 | use core::task::{Context, Poll, Waker}; | 5 | use core::task::{Context, Poll, Waker}; |
| 6 | 6 | ||
| 7 | use atomic_polyfill::AtomicUsize; | 7 | use atomic_polyfill::AtomicUsize; |
| 8 | use embassy_cortex_m::interrupt::Priority; | ||
| 9 | use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; | 8 | use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; |
| 10 | use embassy_sync::waitqueue::AtomicWaker; | 9 | use embassy_sync::waitqueue::AtomicWaker; |
| 11 | 10 | ||
| @@ -14,6 +13,7 @@ use super::word::{Word, WordSize}; | |||
| 14 | use super::Dir; | 13 | use super::Dir; |
| 15 | use crate::_generated::DMA_CHANNEL_COUNT; | 14 | use crate::_generated::DMA_CHANNEL_COUNT; |
| 16 | use crate::interrupt::typelevel::Interrupt; | 15 | use crate::interrupt::typelevel::Interrupt; |
| 16 | use crate::interrupt::Priority; | ||
| 17 | use crate::pac::dma::{regs, vals}; | 17 | use crate::pac::dma::{regs, vals}; |
| 18 | use crate::{interrupt, pac}; | 18 | use crate::{interrupt, pac}; |
| 19 | 19 | ||
diff --git a/embassy-stm32/src/dma/gpdma.rs b/embassy-stm32/src/dma/gpdma.rs index 59ec205bf..3f0d5e8fa 100644 --- a/embassy-stm32/src/dma/gpdma.rs +++ b/embassy-stm32/src/dma/gpdma.rs | |||
| @@ -5,7 +5,6 @@ use core::pin::Pin; | |||
| 5 | use core::sync::atomic::{fence, Ordering}; | 5 | use core::sync::atomic::{fence, Ordering}; |
| 6 | use core::task::{Context, Poll}; | 6 | use core::task::{Context, Poll}; |
| 7 | 7 | ||
| 8 | use embassy_cortex_m::interrupt::Priority; | ||
| 9 | use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; | 8 | use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; |
| 10 | use embassy_sync::waitqueue::AtomicWaker; | 9 | use embassy_sync::waitqueue::AtomicWaker; |
| 11 | 10 | ||
| @@ -13,6 +12,7 @@ use super::word::{Word, WordSize}; | |||
| 13 | use super::Dir; | 12 | use super::Dir; |
| 14 | use crate::_generated::GPDMA_CHANNEL_COUNT; | 13 | use crate::_generated::GPDMA_CHANNEL_COUNT; |
| 15 | use crate::interrupt::typelevel::Interrupt; | 14 | use crate::interrupt::typelevel::Interrupt; |
| 15 | use crate::interrupt::Priority; | ||
| 16 | use crate::pac; | 16 | use crate::pac; |
| 17 | use crate::pac::gpdma::vals; | 17 | use crate::pac::gpdma::vals; |
| 18 | 18 | ||
diff --git a/embassy-stm32/src/dma/mod.rs b/embassy-stm32/src/dma/mod.rs index 3ac0d1b3d..0858587bd 100644 --- a/embassy-stm32/src/dma/mod.rs +++ b/embassy-stm32/src/dma/mod.rs | |||
| @@ -26,11 +26,11 @@ pub mod word; | |||
| 26 | 26 | ||
| 27 | use core::mem; | 27 | use core::mem; |
| 28 | 28 | ||
| 29 | use embassy_cortex_m::interrupt::Priority; | ||
| 30 | use embassy_hal_common::impl_peripheral; | 29 | use embassy_hal_common::impl_peripheral; |
| 31 | 30 | ||
| 32 | #[cfg(dmamux)] | 31 | #[cfg(dmamux)] |
| 33 | pub use self::dmamux::*; | 32 | pub use self::dmamux::*; |
| 33 | use crate::interrupt::Priority; | ||
| 34 | 34 | ||
| 35 | #[derive(Debug, Copy, Clone, PartialEq, Eq)] | 35 | #[derive(Debug, Copy, Clone, PartialEq, Eq)] |
| 36 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 36 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs index f8857fdd2..f4ec0a80d 100644 --- a/embassy-stm32/src/lib.rs +++ b/embassy-stm32/src/lib.rs | |||
| @@ -79,7 +79,7 @@ pub use crate::_generated::interrupt; | |||
| 79 | /// This defines the right interrupt handlers, and creates a unit struct (like `struct Irqs;`) | 79 | /// This defines the right interrupt handlers, and creates a unit struct (like `struct Irqs;`) |
| 80 | /// and implements the right [`Binding`]s for it. You can pass this struct to drivers to | 80 | /// and implements the right [`Binding`]s for it. You can pass this struct to drivers to |
| 81 | /// prove at compile-time that the right interrupts have been bound. | 81 | /// prove at compile-time that the right interrupts have been bound. |
| 82 | // developer note: this macro can't be in `embassy-cortex-m` due to the use of `$crate`. | 82 | // developer note: this macro can't be in `embassy-hal-common` due to the use of `$crate`. |
| 83 | #[macro_export] | 83 | #[macro_export] |
| 84 | macro_rules! bind_interrupts { | 84 | macro_rules! bind_interrupts { |
| 85 | ($vis:vis struct $name:ident { $($irq:ident => $($handler:ty),*;)* }) => { | 85 | ($vis:vis struct $name:ident { $($irq:ident => $($handler:ty),*;)* }) => { |
| @@ -103,14 +103,13 @@ macro_rules! bind_interrupts { | |||
| 103 | 103 | ||
| 104 | // Reexports | 104 | // Reexports |
| 105 | pub use _generated::{peripherals, Peripherals}; | 105 | pub use _generated::{peripherals, Peripherals}; |
| 106 | pub use embassy_cortex_m::executor; | ||
| 107 | use embassy_cortex_m::interrupt::Priority; | ||
| 108 | pub use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; | 106 | pub use embassy_hal_common::{into_ref, Peripheral, PeripheralRef}; |
| 109 | #[cfg(feature = "unstable-pac")] | 107 | #[cfg(feature = "unstable-pac")] |
| 110 | pub use stm32_metapac as pac; | 108 | pub use stm32_metapac as pac; |
| 111 | #[cfg(not(feature = "unstable-pac"))] | 109 | #[cfg(not(feature = "unstable-pac"))] |
| 112 | pub(crate) use stm32_metapac as pac; | 110 | pub(crate) use stm32_metapac as pac; |
| 113 | 111 | ||
| 112 | use crate::interrupt::Priority; | ||
| 114 | #[cfg(feature = "rt")] | 113 | #[cfg(feature = "rt")] |
| 115 | pub use crate::pac::NVIC_PRIO_BITS; | 114 | pub use crate::pac::NVIC_PRIO_BITS; |
| 116 | 115 | ||
diff --git a/examples/nrf52840/src/bin/multiprio.rs b/examples/nrf52840/src/bin/multiprio.rs index 851e189ea..aab819117 100644 --- a/examples/nrf52840/src/bin/multiprio.rs +++ b/examples/nrf52840/src/bin/multiprio.rs | |||
| @@ -57,14 +57,11 @@ | |||
| 57 | #![no_main] | 57 | #![no_main] |
| 58 | #![feature(type_alias_impl_trait)] | 58 | #![feature(type_alias_impl_trait)] |
| 59 | 59 | ||
| 60 | use core::mem; | ||
| 61 | |||
| 62 | use cortex_m::peripheral::NVIC; | ||
| 63 | use cortex_m_rt::entry; | 60 | use cortex_m_rt::entry; |
| 64 | use defmt::{info, unwrap}; | 61 | use defmt::{info, unwrap}; |
| 65 | use embassy_nrf::executor::{Executor, InterruptExecutor}; | 62 | use embassy_executor::{Executor, InterruptExecutor}; |
| 66 | use embassy_nrf::interrupt; | 63 | use embassy_nrf::interrupt; |
| 67 | use embassy_nrf::pac::Interrupt; | 64 | use embassy_nrf::interrupt::{InterruptExt, Priority}; |
| 68 | use embassy_time::{Duration, Instant, Timer}; | 65 | use embassy_time::{Duration, Instant, Timer}; |
| 69 | use static_cell::StaticCell; | 66 | use static_cell::StaticCell; |
| 70 | use {defmt_rtt as _, panic_probe as _}; | 67 | use {defmt_rtt as _, panic_probe as _}; |
| @@ -130,16 +127,15 @@ fn main() -> ! { | |||
| 130 | info!("Hello World!"); | 127 | info!("Hello World!"); |
| 131 | 128 | ||
| 132 | let _p = embassy_nrf::init(Default::default()); | 129 | let _p = embassy_nrf::init(Default::default()); |
| 133 | let mut nvic: NVIC = unsafe { mem::transmute(()) }; | ||
| 134 | 130 | ||
| 135 | // High-priority executor: SWI1_EGU1, priority level 6 | 131 | // High-priority executor: SWI1_EGU1, priority level 6 |
| 136 | unsafe { nvic.set_priority(Interrupt::SWI1_EGU1, 6 << 5) }; | 132 | interrupt::SWI1_EGU1.set_priority(Priority::P6); |
| 137 | let spawner = EXECUTOR_HIGH.start(Interrupt::SWI1_EGU1); | 133 | let spawner = EXECUTOR_HIGH.start(interrupt::SWI1_EGU1); |
| 138 | unwrap!(spawner.spawn(run_high())); | 134 | unwrap!(spawner.spawn(run_high())); |
| 139 | 135 | ||
| 140 | // Medium-priority executor: SWI0_EGU0, priority level 7 | 136 | // Medium-priority executor: SWI0_EGU0, priority level 7 |
| 141 | unsafe { nvic.set_priority(Interrupt::SWI0_EGU0, 7 << 5) }; | 137 | interrupt::SWI0_EGU0.set_priority(Priority::P7); |
| 142 | let spawner = EXECUTOR_MED.start(Interrupt::SWI0_EGU0); | 138 | let spawner = EXECUTOR_MED.start(interrupt::SWI0_EGU0); |
| 143 | unwrap!(spawner.spawn(run_med())); | 139 | unwrap!(spawner.spawn(run_med())); |
| 144 | 140 | ||
| 145 | // Low priority executor: runs in thread mode, using WFE/SEV | 141 | // Low priority executor: runs in thread mode, using WFE/SEV |
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml index e946b481d..48f3a26bb 100644 --- a/examples/rp/Cargo.toml +++ b/examples/rp/Cargo.toml | |||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | |||
| 8 | [dependencies] | 8 | [dependencies] |
| 9 | embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal", features = ["defmt"] } | 9 | embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal", features = ["defmt"] } |
| 10 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | 11 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } |
| 12 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["nightly", "unstable-traits", "defmt", "defmt-timestamp-uptime"] } | 12 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["nightly", "unstable-traits", "defmt", "defmt-timestamp-uptime"] } |
| 13 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver", "critical-section-impl"] } | 13 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver", "critical-section-impl"] } |
| 14 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } |
diff --git a/examples/rp/src/bin/multiprio.rs b/examples/rp/src/bin/multiprio.rs index 2f79ba49e..9ace4cd68 100644 --- a/examples/rp/src/bin/multiprio.rs +++ b/examples/rp/src/bin/multiprio.rs | |||
| @@ -57,14 +57,11 @@ | |||
| 57 | #![no_main] | 57 | #![no_main] |
| 58 | #![feature(type_alias_impl_trait)] | 58 | #![feature(type_alias_impl_trait)] |
| 59 | 59 | ||
| 60 | use core::mem; | ||
| 61 | |||
| 62 | use cortex_m::peripheral::NVIC; | ||
| 63 | use cortex_m_rt::entry; | 60 | use cortex_m_rt::entry; |
| 64 | use defmt::{info, unwrap}; | 61 | use defmt::{info, unwrap}; |
| 65 | use embassy_rp::executor::{Executor, InterruptExecutor}; | 62 | use embassy_executor::{Executor, InterruptExecutor}; |
| 66 | use embassy_rp::interrupt; | 63 | use embassy_rp::interrupt; |
| 67 | use embassy_rp::pac::Interrupt; | 64 | use embassy_rp::interrupt::{InterruptExt, Priority}; |
| 68 | use embassy_time::{Duration, Instant, Timer, TICK_HZ}; | 65 | use embassy_time::{Duration, Instant, Timer, TICK_HZ}; |
| 69 | use static_cell::StaticCell; | 66 | use static_cell::StaticCell; |
| 70 | use {defmt_rtt as _, panic_probe as _}; | 67 | use {defmt_rtt as _, panic_probe as _}; |
| @@ -130,18 +127,15 @@ fn main() -> ! { | |||
| 130 | info!("Hello World!"); | 127 | info!("Hello World!"); |
| 131 | 128 | ||
| 132 | let _p = embassy_rp::init(Default::default()); | 129 | let _p = embassy_rp::init(Default::default()); |
| 133 | let mut nvic: NVIC = unsafe { mem::transmute(()) }; | ||
| 134 | 130 | ||
| 135 | // High-priority executor: SWI_IRQ_1, priority level 2 | 131 | // High-priority executor: SWI_IRQ_1, priority level 2 |
| 136 | unsafe { nvic.set_priority(Interrupt::SWI_IRQ_1, 2 << 6) }; | 132 | interrupt::SWI_IRQ_1.set_priority(Priority::P2); |
| 137 | info!("bla: {}", NVIC::get_priority(Interrupt::SWI_IRQ_1)); | 133 | let spawner = EXECUTOR_HIGH.start(interrupt::SWI_IRQ_1); |
| 138 | let spawner = EXECUTOR_HIGH.start(Interrupt::SWI_IRQ_1); | ||
| 139 | unwrap!(spawner.spawn(run_high())); | 134 | unwrap!(spawner.spawn(run_high())); |
| 140 | 135 | ||
| 141 | // Medium-priority executor: SWI_IRQ_0, priority level 3 | 136 | // Medium-priority executor: SWI_IRQ_0, priority level 3 |
| 142 | unsafe { nvic.set_priority(Interrupt::SWI_IRQ_0, 3 << 6) }; | 137 | interrupt::SWI_IRQ_0.set_priority(Priority::P3); |
| 143 | info!("bla: {}", NVIC::get_priority(Interrupt::SWI_IRQ_0)); | 138 | let spawner = EXECUTOR_MED.start(interrupt::SWI_IRQ_0); |
| 144 | let spawner = EXECUTOR_MED.start(Interrupt::SWI_IRQ_0); | ||
| 145 | unwrap!(spawner.spawn(run_med())); | 139 | unwrap!(spawner.spawn(run_med())); |
| 146 | 140 | ||
| 147 | // Low priority executor: runs in thread mode, using WFE/SEV | 141 | // Low priority executor: runs in thread mode, using WFE/SEV |
diff --git a/examples/stm32c0/Cargo.toml b/examples/stm32c0/Cargo.toml index ad11fbd1c..43f432520 100644 --- a/examples/stm32c0/Cargo.toml +++ b/examples/stm32c0/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32c031c6", "memory-x", "unstable-pac", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32c031c6", "memory-x", "unstable-pac", "exti"] } |
| 12 | 12 | ||
diff --git a/examples/stm32f0/Cargo.toml b/examples/stm32f0/Cargo.toml index ff134bb0e..8d2248ed0 100644 --- a/examples/stm32f0/Cargo.toml +++ b/examples/stm32f0/Cargo.toml | |||
| @@ -13,7 +13,7 @@ defmt = "0.3" | |||
| 13 | defmt-rtt = "0.4" | 13 | defmt-rtt = "0.4" |
| 14 | panic-probe = "0.3" | 14 | panic-probe = "0.3" |
| 15 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 15 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 16 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | 16 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } |
| 17 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 17 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 18 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "memory-x", "stm32f091rc", "time-driver-any", "exti", "unstable-pac"] } | 18 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "memory-x", "stm32f091rc", "time-driver-any", "exti", "unstable-pac"] } |
| 19 | static_cell = { version = "1.1", features = ["nightly"]} | 19 | static_cell = { version = "1.1", features = ["nightly"]} |
diff --git a/examples/stm32f0/src/bin/multiprio.rs b/examples/stm32f0/src/bin/multiprio.rs index 430a805fc..988ffeef1 100644 --- a/examples/stm32f0/src/bin/multiprio.rs +++ b/examples/stm32f0/src/bin/multiprio.rs | |||
| @@ -57,14 +57,11 @@ | |||
| 57 | #![no_main] | 57 | #![no_main] |
| 58 | #![feature(type_alias_impl_trait)] | 58 | #![feature(type_alias_impl_trait)] |
| 59 | 59 | ||
| 60 | use core::mem; | ||
| 61 | |||
| 62 | use cortex_m::peripheral::NVIC; | ||
| 63 | use cortex_m_rt::entry; | 60 | use cortex_m_rt::entry; |
| 64 | use defmt::*; | 61 | use defmt::*; |
| 65 | use embassy_executor::{Executor, InterruptExecutor}; | 62 | use embassy_executor::{Executor, InterruptExecutor}; |
| 66 | use embassy_stm32::interrupt; | 63 | use embassy_stm32::interrupt; |
| 67 | use embassy_stm32::pac::Interrupt; | 64 | use embassy_stm32::interrupt::{InterruptExt, Priority}; |
| 68 | use embassy_time::{Duration, Instant, Timer}; | 65 | use embassy_time::{Duration, Instant, Timer}; |
| 69 | use static_cell::StaticCell; | 66 | use static_cell::StaticCell; |
| 70 | use {defmt_rtt as _, panic_probe as _}; | 67 | use {defmt_rtt as _, panic_probe as _}; |
| @@ -129,16 +126,15 @@ unsafe fn USART2() { | |||
| 129 | fn main() -> ! { | 126 | fn main() -> ! { |
| 130 | // Initialize and create handle for devicer peripherals | 127 | // Initialize and create handle for devicer peripherals |
| 131 | let _p = embassy_stm32::init(Default::default()); | 128 | let _p = embassy_stm32::init(Default::default()); |
| 132 | let mut nvic: NVIC = unsafe { mem::transmute(()) }; | ||
| 133 | 129 | ||
| 134 | // High-priority executor: USART1, priority level 6 | 130 | // High-priority executor: USART1, priority level 6 |
| 135 | unsafe { nvic.set_priority(Interrupt::USART1, 6 << 4) }; | 131 | interrupt::USART1.set_priority(Priority::P6); |
| 136 | let spawner = EXECUTOR_HIGH.start(Interrupt::USART1); | 132 | let spawner = EXECUTOR_HIGH.start(interrupt::USART1); |
| 137 | unwrap!(spawner.spawn(run_high())); | 133 | unwrap!(spawner.spawn(run_high())); |
| 138 | 134 | ||
| 139 | // Medium-priority executor: USART2, priority level 7 | 135 | // Medium-priority executor: USART2, priority level 7 |
| 140 | unsafe { nvic.set_priority(Interrupt::USART2, 7 << 4) }; | 136 | interrupt::USART2.set_priority(Priority::P7); |
| 141 | let spawner = EXECUTOR_MED.start(Interrupt::USART2); | 137 | let spawner = EXECUTOR_MED.start(interrupt::USART2); |
| 142 | unwrap!(spawner.spawn(run_med())); | 138 | unwrap!(spawner.spawn(run_med())); |
| 143 | 139 | ||
| 144 | // Low priority executor: runs in thread mode, using WFE/SEV | 140 | // Low priority executor: runs in thread mode, using WFE/SEV |
diff --git a/examples/stm32f1/Cargo.toml b/examples/stm32f1/Cargo.toml index 345e948a6..d34fd439a 100644 --- a/examples/stm32f1/Cargo.toml +++ b/examples/stm32f1/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-any", "unstable-traits" ] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-any", "unstable-traits" ] } |
| 12 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | 12 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } |
diff --git a/examples/stm32f2/Cargo.toml b/examples/stm32f2/Cargo.toml index e4f97a589..5e3e0d0f7 100644 --- a/examples/stm32f2/Cargo.toml +++ b/examples/stm32f2/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f207zg", "unstable-pac", "memory-x", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f207zg", "unstable-pac", "memory-x", "time-driver-any", "exti"] } |
| 12 | 12 | ||
diff --git a/examples/stm32f3/Cargo.toml b/examples/stm32f3/Cargo.toml index 0fe9cb122..29ab2009c 100644 --- a/examples/stm32f3/Cargo.toml +++ b/examples/stm32f3/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f303ze", "unstable-pac", "memory-x", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f303ze", "unstable-pac", "memory-x", "time-driver-any", "exti"] } |
| 12 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | 12 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } |
diff --git a/examples/stm32f3/src/bin/multiprio.rs b/examples/stm32f3/src/bin/multiprio.rs index 5d010f799..80bf59deb 100644 --- a/examples/stm32f3/src/bin/multiprio.rs +++ b/examples/stm32f3/src/bin/multiprio.rs | |||
| @@ -57,14 +57,11 @@ | |||
| 57 | #![no_main] | 57 | #![no_main] |
| 58 | #![feature(type_alias_impl_trait)] | 58 | #![feature(type_alias_impl_trait)] |
| 59 | 59 | ||
| 60 | use core::mem; | ||
| 61 | |||
| 62 | use cortex_m::peripheral::NVIC; | ||
| 63 | use cortex_m_rt::entry; | 60 | use cortex_m_rt::entry; |
| 64 | use defmt::*; | 61 | use defmt::*; |
| 65 | use embassy_executor::{Executor, InterruptExecutor}; | 62 | use embassy_executor::{Executor, InterruptExecutor}; |
| 66 | use embassy_stm32::interrupt; | 63 | use embassy_stm32::interrupt; |
| 67 | use embassy_stm32::pac::Interrupt; | 64 | use embassy_stm32::interrupt::{InterruptExt, Priority}; |
| 68 | use embassy_time::{Duration, Instant, Timer}; | 65 | use embassy_time::{Duration, Instant, Timer}; |
| 69 | use static_cell::StaticCell; | 66 | use static_cell::StaticCell; |
| 70 | use {defmt_rtt as _, panic_probe as _}; | 67 | use {defmt_rtt as _, panic_probe as _}; |
| @@ -130,16 +127,15 @@ fn main() -> ! { | |||
| 130 | info!("Hello World!"); | 127 | info!("Hello World!"); |
| 131 | 128 | ||
| 132 | let _p = embassy_stm32::init(Default::default()); | 129 | let _p = embassy_stm32::init(Default::default()); |
| 133 | let mut nvic: NVIC = unsafe { mem::transmute(()) }; | ||
| 134 | 130 | ||
| 135 | // High-priority executor: UART4, priority level 6 | 131 | // High-priority executor: UART4, priority level 6 |
| 136 | unsafe { nvic.set_priority(Interrupt::UART4, 6 << 4) }; | 132 | interrupt::UART4.set_priority(Priority::P6); |
| 137 | let spawner = EXECUTOR_HIGH.start(Interrupt::UART4); | 133 | let spawner = EXECUTOR_HIGH.start(interrupt::UART4); |
| 138 | unwrap!(spawner.spawn(run_high())); | 134 | unwrap!(spawner.spawn(run_high())); |
| 139 | 135 | ||
| 140 | // Medium-priority executor: UART5, priority level 7 | 136 | // Medium-priority executor: UART5, priority level 7 |
| 141 | unsafe { nvic.set_priority(Interrupt::UART5, 7 << 4) }; | 137 | interrupt::UART5.set_priority(Priority::P7); |
| 142 | let spawner = EXECUTOR_MED.start(Interrupt::UART5); | 138 | let spawner = EXECUTOR_MED.start(interrupt::UART5); |
| 143 | unwrap!(spawner.spawn(run_med())); | 139 | unwrap!(spawner.spawn(run_med())); |
| 144 | 140 | ||
| 145 | // Low priority executor: runs in thread mode, using WFE/SEV | 141 | // Low priority executor: runs in thread mode, using WFE/SEV |
diff --git a/examples/stm32f4/Cargo.toml b/examples/stm32f4/Cargo.toml index 3a8efdd06..7ecb64fce 100644 --- a/examples/stm32f4/Cargo.toml +++ b/examples/stm32f4/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers", "arch-cortex-m", "executor-thread", "executor-interrupt"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers", "arch-cortex-m", "executor-thread", "executor-interrupt"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "unstable-traits", "defmt", "stm32f429zi", "unstable-pac", "memory-x", "time-driver-any", "exti", "embedded-sdmmc", "chrono"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "unstable-traits", "defmt", "stm32f429zi", "unstable-pac", "memory-x", "time-driver-any", "exti", "embedded-sdmmc", "chrono"] } |
| 12 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | 12 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } |
diff --git a/examples/stm32f4/src/bin/multiprio.rs b/examples/stm32f4/src/bin/multiprio.rs index 5d010f799..80bf59deb 100644 --- a/examples/stm32f4/src/bin/multiprio.rs +++ b/examples/stm32f4/src/bin/multiprio.rs | |||
| @@ -57,14 +57,11 @@ | |||
| 57 | #![no_main] | 57 | #![no_main] |
| 58 | #![feature(type_alias_impl_trait)] | 58 | #![feature(type_alias_impl_trait)] |
| 59 | 59 | ||
| 60 | use core::mem; | ||
| 61 | |||
| 62 | use cortex_m::peripheral::NVIC; | ||
| 63 | use cortex_m_rt::entry; | 60 | use cortex_m_rt::entry; |
| 64 | use defmt::*; | 61 | use defmt::*; |
| 65 | use embassy_executor::{Executor, InterruptExecutor}; | 62 | use embassy_executor::{Executor, InterruptExecutor}; |
| 66 | use embassy_stm32::interrupt; | 63 | use embassy_stm32::interrupt; |
| 67 | use embassy_stm32::pac::Interrupt; | 64 | use embassy_stm32::interrupt::{InterruptExt, Priority}; |
| 68 | use embassy_time::{Duration, Instant, Timer}; | 65 | use embassy_time::{Duration, Instant, Timer}; |
| 69 | use static_cell::StaticCell; | 66 | use static_cell::StaticCell; |
| 70 | use {defmt_rtt as _, panic_probe as _}; | 67 | use {defmt_rtt as _, panic_probe as _}; |
| @@ -130,16 +127,15 @@ fn main() -> ! { | |||
| 130 | info!("Hello World!"); | 127 | info!("Hello World!"); |
| 131 | 128 | ||
| 132 | let _p = embassy_stm32::init(Default::default()); | 129 | let _p = embassy_stm32::init(Default::default()); |
| 133 | let mut nvic: NVIC = unsafe { mem::transmute(()) }; | ||
| 134 | 130 | ||
| 135 | // High-priority executor: UART4, priority level 6 | 131 | // High-priority executor: UART4, priority level 6 |
| 136 | unsafe { nvic.set_priority(Interrupt::UART4, 6 << 4) }; | 132 | interrupt::UART4.set_priority(Priority::P6); |
| 137 | let spawner = EXECUTOR_HIGH.start(Interrupt::UART4); | 133 | let spawner = EXECUTOR_HIGH.start(interrupt::UART4); |
| 138 | unwrap!(spawner.spawn(run_high())); | 134 | unwrap!(spawner.spawn(run_high())); |
| 139 | 135 | ||
| 140 | // Medium-priority executor: UART5, priority level 7 | 136 | // Medium-priority executor: UART5, priority level 7 |
| 141 | unsafe { nvic.set_priority(Interrupt::UART5, 7 << 4) }; | 137 | interrupt::UART5.set_priority(Priority::P7); |
| 142 | let spawner = EXECUTOR_MED.start(Interrupt::UART5); | 138 | let spawner = EXECUTOR_MED.start(interrupt::UART5); |
| 143 | unwrap!(spawner.spawn(run_med())); | 139 | unwrap!(spawner.spawn(run_med())); |
| 144 | 140 | ||
| 145 | // Low priority executor: runs in thread mode, using WFE/SEV | 141 | // Low priority executor: runs in thread mode, using WFE/SEV |
diff --git a/examples/stm32f7/Cargo.toml b/examples/stm32f7/Cargo.toml index 7a650067c..657251c50 100644 --- a/examples/stm32f7/Cargo.toml +++ b/examples/stm32f7/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f767zi", "unstable-pac", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f767zi", "unstable-pac", "time-driver-any", "exti"] } |
| 12 | embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet"] } | 12 | embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet"] } |
diff --git a/examples/stm32g0/Cargo.toml b/examples/stm32g0/Cargo.toml index 4d7fc4548..c5245757b 100644 --- a/examples/stm32g0/Cargo.toml +++ b/examples/stm32g0/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g071rb", "memory-x", "unstable-pac", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g071rb", "memory-x", "unstable-pac", "exti"] } |
| 12 | 12 | ||
diff --git a/examples/stm32g4/Cargo.toml b/examples/stm32g4/Cargo.toml index 00e2dae4c..f94df2dd3 100644 --- a/examples/stm32g4/Cargo.toml +++ b/examples/stm32g4/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g491re", "memory-x", "unstable-pac", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g491re", "memory-x", "unstable-pac", "exti"] } |
| 12 | embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } | 12 | embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } |
diff --git a/examples/stm32h5/Cargo.toml b/examples/stm32h5/Cargo.toml index d49a0dde7..ebe511347 100644 --- a/examples/stm32h5/Cargo.toml +++ b/examples/stm32h5/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h563zi", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h563zi", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } |
| 12 | embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "unstable-traits", "proto-ipv6"] } | 12 | embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "unstable-traits", "proto-ipv6"] } |
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml index 08b57f988..62ef5e9e4 100644 --- a/examples/stm32h7/Cargo.toml +++ b/examples/stm32h7/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h743bi", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h743bi", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } |
| 12 | embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "unstable-traits", "proto-ipv6"] } | 12 | embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "unstable-traits", "proto-ipv6"] } |
diff --git a/examples/stm32l0/Cargo.toml b/examples/stm32l0/Cargo.toml index 235f1b0b3..2ead714e4 100644 --- a/examples/stm32l0/Cargo.toml +++ b/examples/stm32l0/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [features] | 7 | [features] |
| 8 | default = ["nightly"] | 8 | default = ["nightly"] |
| 9 | nightly = ["embassy-stm32/nightly", "embassy-time/nightly", "embassy-time/unstable-traits", | 9 | nightly = ["embassy-stm32/nightly", "embassy-time/nightly", "embassy-time/unstable-traits", "embassy-executor/nightly", |
| 10 | "embassy-lora", "lora-phy", "lorawan-device", "lorawan", "embedded-io/async"] | 10 | "embassy-lora", "lora-phy", "lorawan-device", "lorawan", "embedded-io/async"] |
| 11 | 11 | ||
| 12 | [dependencies] | 12 | [dependencies] |
diff --git a/examples/stm32l1/Cargo.toml b/examples/stm32l1/Cargo.toml index 8b6508c87..93d48abeb 100644 --- a/examples/stm32l1/Cargo.toml +++ b/examples/stm32l1/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32l151cb-a", "time-driver-any", "memory-x"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32l151cb-a", "time-driver-any", "memory-x"] } |
| 12 | 12 | ||
diff --git a/examples/stm32l4/Cargo.toml b/examples/stm32l4/Cargo.toml index 29d091f94..3bb473ef5 100644 --- a/examples/stm32l4/Cargo.toml +++ b/examples/stm32l4/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal" } | 11 | embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal" } |
| 12 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32l4s5vi", "time-driver-any", "exti", "unstable-traits"] } | 12 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32l4s5vi", "time-driver-any", "exti", "unstable-traits"] } |
diff --git a/examples/stm32l5/Cargo.toml b/examples/stm32l5/Cargo.toml index 2ac9c180d..6035c291f 100644 --- a/examples/stm32l5/Cargo.toml +++ b/examples/stm32l5/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32l552ze", "time-driver-any", "exti", "unstable-traits", "memory-x"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32l552ze", "time-driver-any", "exti", "unstable-traits", "memory-x"] } |
| 12 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | 12 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } |
diff --git a/examples/stm32u5/Cargo.toml b/examples/stm32u5/Cargo.toml index be205f880..e2318c3d6 100644 --- a/examples/stm32u5/Cargo.toml +++ b/examples/stm32u5/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32u585ai", "time-driver-any", "memory-x" ] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32u585ai", "time-driver-any", "memory-x" ] } |
| 12 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | 12 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } |
diff --git a/examples/stm32wb/Cargo.toml b/examples/stm32wb/Cargo.toml index 8cfac772a..14897b171 100644 --- a/examples/stm32wb/Cargo.toml +++ b/examples/stm32wb/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32wb55rg", "time-driver-any", "memory-x", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32wb55rg", "time-driver-any", "memory-x", "exti"] } |
| 12 | 12 | ||
diff --git a/examples/stm32wl/Cargo.toml b/examples/stm32wl/Cargo.toml index 6191d01e9..260f9afa1 100644 --- a/examples/stm32wl/Cargo.toml +++ b/examples/stm32wl/Cargo.toml | |||
| @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["nightly", "unstable-traits", "defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["nightly", "unstable-traits", "defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "unstable-traits", "defmt", "stm32wl55jc-cm4", "time-driver-any", "memory-x", "unstable-pac", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "unstable-traits", "defmt", "stm32wl55jc-cm4", "time-driver-any", "memory-x", "unstable-pac", "exti"] } |
| 12 | embassy-embedded-hal = {version = "0.1.0", path = "../../embassy-embedded-hal" } | 12 | embassy-embedded-hal = {version = "0.1.0", path = "../../embassy-embedded-hal" } |
diff --git a/tests/rp/Cargo.toml b/tests/rp/Cargo.toml index fa97fdcc4..180d0ebbe 100644 --- a/tests/rp/Cargo.toml +++ b/tests/rp/Cargo.toml | |||
| @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" | |||
| 8 | teleprobe-meta = "1.1" | 8 | teleprobe-meta = "1.1" |
| 9 | 9 | ||
| 10 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 11 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 12 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt"] } | 12 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt"] } |
| 13 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["nightly", "defmt", "unstable-pac", "unstable-traits", "time-driver", "critical-section-impl", "intrinsics", "rom-v2-intrinsics", "run-from-ram"] } | 13 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["nightly", "defmt", "unstable-pac", "unstable-traits", "time-driver", "critical-section-impl", "intrinsics", "rom-v2-intrinsics", "run-from-ram"] } |
| 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml index f1b0ba121..3f48bf3f1 100644 --- a/tests/stm32/Cargo.toml +++ b/tests/stm32/Cargo.toml | |||
| @@ -25,7 +25,7 @@ not-gpdma = [] | |||
| 25 | teleprobe-meta = "1" | 25 | teleprobe-meta = "1" |
| 26 | 26 | ||
| 27 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } | 27 | embassy-sync = { version = "0.2.0", path = "../../embassy-sync", features = ["defmt"] } |
| 28 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 28 | embassy-executor = { version = "0.2.0", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 29 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "tick-hz-32_768", "defmt-timestamp-uptime"] } | 29 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "tick-hz-32_768", "defmt-timestamp-uptime"] } |
| 30 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "memory-x", "time-driver-any"] } | 30 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "memory-x", "time-driver-any"] } |
| 31 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 31 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
