diff options
| author | Henrik Alsér <[email protected]> | 2022-07-09 23:41:02 +0200 |
|---|---|---|
| committer | Henrik Alsér <[email protected]> | 2022-07-09 23:41:02 +0200 |
| commit | baae64d911d6f2bd2560b64b3856471b390f41cd (patch) | |
| tree | a1818b56b817bd5f0897daf6ff372a48ce006231 /embassy-embedded-hal/src/shared_bus/i2c.rs | |
| parent | 880b71a1e8246011109d64794ec98477722bde0e (diff) | |
Add embassy-embedded-hal nightly feature
Diffstat (limited to 'embassy-embedded-hal/src/shared_bus/i2c.rs')
| -rw-r--r-- | embassy-embedded-hal/src/shared_bus/i2c.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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, |
