diff options
| -rw-r--r-- | embassy-embedded-hal/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy-embedded-hal/src/shared_bus/i2c.rs | 3 | ||||
| -rw-r--r-- | embassy-embedded-hal/src/shared_bus/spi.rs | 3 | ||||
| -rw-r--r-- | embassy-nrf/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy-rp/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy-stm32/Cargo.toml | 2 |
6 files changed, 11 insertions, 3 deletions
diff --git a/embassy-embedded-hal/Cargo.toml b/embassy-embedded-hal/Cargo.toml index d1b9f3ea4..15d3beb2f 100644 --- a/embassy-embedded-hal/Cargo.toml +++ b/embassy-embedded-hal/Cargo.toml | |||
| @@ -5,6 +5,8 @@ edition = "2021" | |||
| 5 | 5 | ||
| 6 | [features] | 6 | [features] |
| 7 | std = [] | 7 | std = [] |
| 8 | # Enable nightly-only features | ||
| 9 | nightly = ["embedded-hal-async"] | ||
| 8 | 10 | ||
| 9 | [dependencies] | 11 | [dependencies] |
| 10 | embassy = { version = "0.1.0", path = "../embassy" } | 12 | embassy = { version = "0.1.0", path = "../embassy" } |
diff --git a/embassy-embedded-hal/src/shared_bus/i2c.rs b/embassy-embedded-hal/src/shared_bus/i2c.rs index 18f144531..f63190e6a 100644 --- a/embassy-embedded-hal/src/shared_bus/i2c.rs +++ b/embassy-embedded-hal/src/shared_bus/i2c.rs | |||
| @@ -27,6 +27,7 @@ use core::future::Future; | |||
| 27 | 27 | ||
| 28 | use embassy::blocking_mutex::raw::RawMutex; | 28 | use embassy::blocking_mutex::raw::RawMutex; |
| 29 | use embassy::mutex::Mutex; | 29 | use embassy::mutex::Mutex; |
| 30 | #[cfg(feature = "nightly")] | ||
| 30 | use embedded_hal_async::i2c; | 31 | use embedded_hal_async::i2c; |
| 31 | 32 | ||
| 32 | use crate::SetConfig; | 33 | use crate::SetConfig; |
| @@ -64,6 +65,7 @@ where | |||
| 64 | type Error = I2cBusDeviceError<BUS::Error>; | 65 | type Error = I2cBusDeviceError<BUS::Error>; |
| 65 | } | 66 | } |
| 66 | 67 | ||
| 68 | #[cfg(feature = "nightly")] | ||
| 67 | impl<M, BUS> i2c::I2c for I2cBusDevice<'_, M, BUS> | 69 | impl<M, BUS> i2c::I2c for I2cBusDevice<'_, M, BUS> |
| 68 | where | 70 | where |
| 69 | M: RawMutex + 'static, | 71 | M: RawMutex + 'static, |
| @@ -139,6 +141,7 @@ where | |||
| 139 | type Error = I2cBusDeviceError<BUS::Error>; | 141 | type Error = I2cBusDeviceError<BUS::Error>; |
| 140 | } | 142 | } |
| 141 | 143 | ||
| 144 | #[cfg(feature = "nightly")] | ||
| 142 | impl<M, BUS> i2c::I2c for I2cBusDeviceWithConfig<'_, M, BUS> | 145 | impl<M, BUS> i2c::I2c for I2cBusDeviceWithConfig<'_, M, BUS> |
| 143 | where | 146 | where |
| 144 | M: RawMutex + 'static, | 147 | M: RawMutex + 'static, |
diff --git a/embassy-embedded-hal/src/shared_bus/spi.rs b/embassy-embedded-hal/src/shared_bus/spi.rs index 8e3762e68..136352e0a 100644 --- a/embassy-embedded-hal/src/shared_bus/spi.rs +++ b/embassy-embedded-hal/src/shared_bus/spi.rs | |||
| @@ -32,6 +32,7 @@ use embassy::blocking_mutex::raw::RawMutex; | |||
| 32 | use embassy::mutex::Mutex; | 32 | use embassy::mutex::Mutex; |
| 33 | use embedded_hal_1::digital::blocking::OutputPin; | 33 | use embedded_hal_1::digital::blocking::OutputPin; |
| 34 | use embedded_hal_1::spi::ErrorType; | 34 | use embedded_hal_1::spi::ErrorType; |
| 35 | #[cfg(feature = "nightly")] | ||
| 35 | use embedded_hal_async::spi; | 36 | use embedded_hal_async::spi; |
| 36 | 37 | ||
| 37 | use crate::SetConfig; | 38 | use crate::SetConfig; |
| @@ -74,6 +75,7 @@ where | |||
| 74 | type Error = SpiBusDeviceError<BUS::Error, CS::Error>; | 75 | type Error = SpiBusDeviceError<BUS::Error, CS::Error>; |
| 75 | } | 76 | } |
| 76 | 77 | ||
| 78 | #[cfg(feature = "nightly")] | ||
| 77 | impl<M, BUS, CS> spi::SpiDevice for SpiBusDevice<'_, M, BUS, CS> | 79 | impl<M, BUS, CS> spi::SpiDevice for SpiBusDevice<'_, M, BUS, CS> |
| 78 | where | 80 | where |
| 79 | M: RawMutex + 'static, | 81 | M: RawMutex + 'static, |
| @@ -133,6 +135,7 @@ where | |||
| 133 | type Error = SpiBusDeviceError<BUS::Error, CS::Error>; | 135 | type Error = SpiBusDeviceError<BUS::Error, CS::Error>; |
| 134 | } | 136 | } |
| 135 | 137 | ||
| 138 | #[cfg(feature = "nightly")] | ||
| 136 | impl<M, BUS, CS> spi::SpiDevice for SpiBusDeviceWithConfig<'_, M, BUS, CS> | 139 | impl<M, BUS, CS> spi::SpiDevice for SpiBusDeviceWithConfig<'_, M, BUS, CS> |
| 137 | where | 140 | where |
| 138 | M: RawMutex + 'static, | 141 | M: RawMutex + 'static, |
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index 3f9dabbb5..3569a70c6 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml | |||
| @@ -21,7 +21,7 @@ time = ["embassy/time"] | |||
| 21 | defmt = ["dep:defmt", "embassy/defmt", "embassy-usb?/defmt", "embedded-io?/defmt"] | 21 | defmt = ["dep:defmt", "embassy/defmt", "embassy-usb?/defmt", "embedded-io?/defmt"] |
| 22 | 22 | ||
| 23 | # Enable nightly-only features | 23 | # Enable nightly-only features |
| 24 | nightly = ["embassy/nightly", "embedded-hal-1", "embedded-hal-async", "embassy-usb", "embedded-storage-async", "dep:embedded-io"] | 24 | nightly = ["embassy/nightly", "embedded-hal-1", "embedded-hal-async", "embassy-usb", "embedded-storage-async", "dep:embedded-io", "embassy-embedded-hal/nightly"] |
| 25 | 25 | ||
| 26 | # Reexport the PAC for the currently enabled chip at `embassy_nrf::pac`. | 26 | # Reexport the PAC for the currently enabled chip at `embassy_nrf::pac`. |
| 27 | # This is unstable because semver-minor (non-breaking) releases of embassy-nrf may major-bump (breaking) the PAC version. | 27 | # This is unstable because semver-minor (non-breaking) releases of embassy-nrf may major-bump (breaking) the PAC version. |
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index 0a278ab00..95ae76cd2 100644 --- a/embassy-rp/Cargo.toml +++ b/embassy-rp/Cargo.toml | |||
| @@ -20,7 +20,7 @@ flavors = [ | |||
| 20 | unstable-pac = [] | 20 | unstable-pac = [] |
| 21 | 21 | ||
| 22 | # Enable nightly-only features | 22 | # Enable nightly-only features |
| 23 | nightly = ["embassy/nightly", "embedded-hal-1", "embedded-hal-async"] | 23 | nightly = ["embassy/nightly", "embedded-hal-1", "embedded-hal-async", "embassy-embedded-hal/nightly"] |
| 24 | 24 | ||
| 25 | # Implement embedded-hal 1.0 alpha traits. | 25 | # Implement embedded-hal 1.0 alpha traits. |
| 26 | # Implement embedded-hal-async traits if `nightly` is set as well. | 26 | # Implement embedded-hal-async traits if `nightly` is set as well. |
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 547aad020..a5c444fbb 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml | |||
| @@ -91,7 +91,7 @@ time-driver-tim12 = ["_time-driver"] | |||
| 91 | time-driver-tim15 = ["_time-driver"] | 91 | time-driver-tim15 = ["_time-driver"] |
| 92 | 92 | ||
| 93 | # Enable nightly-only features | 93 | # Enable nightly-only features |
| 94 | nightly = ["embassy/nightly", "embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "dep:embedded-io", "dep:embassy-usb"] | 94 | nightly = ["embassy/nightly", "embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "dep:embedded-io", "dep:embassy-usb", "embassy-embedded-hal/nightly"] |
| 95 | 95 | ||
| 96 | # Reexport stm32-metapac at `embassy_stm32::pac`. | 96 | # Reexport stm32-metapac at `embassy_stm32::pac`. |
| 97 | # This is unstable because semver-minor (non-breaking) releases of embassy-stm32 may major-bump (breaking) the stm32-metapac version. | 97 | # This is unstable because semver-minor (non-breaking) releases of embassy-stm32 may major-bump (breaking) the stm32-metapac version. |
