aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-embedded-hal/Cargo.toml2
-rw-r--r--embassy-embedded-hal/src/shared_bus/i2c.rs3
-rw-r--r--embassy-embedded-hal/src/shared_bus/spi.rs3
-rw-r--r--embassy-nrf/Cargo.toml2
-rw-r--r--embassy-rp/Cargo.toml2
-rw-r--r--embassy-stm32/Cargo.toml2
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]
7std = [] 7std = []
8# Enable nightly-only features
9nightly = ["embedded-hal-async"]
8 10
9[dependencies] 11[dependencies]
10embassy = { version = "0.1.0", path = "../embassy" } 12embassy = { 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
28use embassy::blocking_mutex::raw::RawMutex; 28use embassy::blocking_mutex::raw::RawMutex;
29use embassy::mutex::Mutex; 29use embassy::mutex::Mutex;
30#[cfg(feature = "nightly")]
30use embedded_hal_async::i2c; 31use embedded_hal_async::i2c;
31 32
32use crate::SetConfig; 33use 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")]
67impl<M, BUS> i2c::I2c for I2cBusDevice<'_, M, BUS> 69impl<M, BUS> i2c::I2c for I2cBusDevice<'_, M, BUS>
68where 70where
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")]
142impl<M, BUS> i2c::I2c for I2cBusDeviceWithConfig<'_, M, BUS> 145impl<M, BUS> i2c::I2c for I2cBusDeviceWithConfig<'_, M, BUS>
143where 146where
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;
32use embassy::mutex::Mutex; 32use embassy::mutex::Mutex;
33use embedded_hal_1::digital::blocking::OutputPin; 33use embedded_hal_1::digital::blocking::OutputPin;
34use embedded_hal_1::spi::ErrorType; 34use embedded_hal_1::spi::ErrorType;
35#[cfg(feature = "nightly")]
35use embedded_hal_async::spi; 36use embedded_hal_async::spi;
36 37
37use crate::SetConfig; 38use 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")]
77impl<M, BUS, CS> spi::SpiDevice for SpiBusDevice<'_, M, BUS, CS> 79impl<M, BUS, CS> spi::SpiDevice for SpiBusDevice<'_, M, BUS, CS>
78where 80where
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")]
136impl<M, BUS, CS> spi::SpiDevice for SpiBusDeviceWithConfig<'_, M, BUS, CS> 139impl<M, BUS, CS> spi::SpiDevice for SpiBusDeviceWithConfig<'_, M, BUS, CS>
137where 140where
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"]
21defmt = ["dep:defmt", "embassy/defmt", "embassy-usb?/defmt", "embedded-io?/defmt"] 21defmt = ["dep:defmt", "embassy/defmt", "embassy-usb?/defmt", "embedded-io?/defmt"]
22 22
23# Enable nightly-only features 23# Enable nightly-only features
24nightly = ["embassy/nightly", "embedded-hal-1", "embedded-hal-async", "embassy-usb", "embedded-storage-async", "dep:embedded-io"] 24nightly = ["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 = [
20unstable-pac = [] 20unstable-pac = []
21 21
22# Enable nightly-only features 22# Enable nightly-only features
23nightly = ["embassy/nightly", "embedded-hal-1", "embedded-hal-async"] 23nightly = ["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"]
91time-driver-tim15 = ["_time-driver"] 91time-driver-tim15 = ["_time-driver"]
92 92
93# Enable nightly-only features 93# Enable nightly-only features
94nightly = ["embassy/nightly", "embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "dep:embedded-io", "dep:embassy-usb"] 94nightly = ["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.