diff options
| author | Andres Oliva <[email protected]> | 2023-10-11 23:05:12 +0200 |
|---|---|---|
| committer | Andres Oliva <[email protected]> | 2023-10-11 23:05:12 +0200 |
| commit | b6c0ddb7df86a8c5531ef6ae4c026b2e7175c96b (patch) | |
| tree | b1737fd2ea53847594ed902ae36e614f6bbc9b84 | |
| parent | ee93bbf1d45226ae71234287c382bf1ed530ca97 (diff) | |
Move the feature gates to the i2c module instead of the pub use statement
| -rw-r--r-- | embassy-stm32/src/i2c/mod.rs | 2 | ||||
| -rw-r--r-- | embassy-stm32/src/lib.rs | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/embassy-stm32/src/i2c/mod.rs b/embassy-stm32/src/i2c/mod.rs index 61989c239..d5bb2ed21 100644 --- a/embassy-stm32/src/i2c/mod.rs +++ b/embassy-stm32/src/i2c/mod.rs | |||
| @@ -7,8 +7,6 @@ use crate::interrupt; | |||
| 7 | #[cfg_attr(i2c_v1, path = "v1.rs")] | 7 | #[cfg_attr(i2c_v1, path = "v1.rs")] |
| 8 | #[cfg_attr(all(i2c_v2, feature = "time"), path = "v2.rs")] | 8 | #[cfg_attr(all(i2c_v2, feature = "time"), path = "v2.rs")] |
| 9 | mod _version; | 9 | mod _version; |
| 10 | |||
| 11 | #[cfg(any(i2c_v1, all(i2c_v2, feature = "time")))] | ||
| 12 | pub use _version::*; | 10 | pub use _version::*; |
| 13 | 11 | ||
| 14 | use crate::peripherals; | 12 | use crate::peripherals; |
diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs index e883678b5..cfb78da3d 100644 --- a/embassy-stm32/src/lib.rs +++ b/embassy-stm32/src/lib.rs | |||
| @@ -41,7 +41,7 @@ pub mod flash; | |||
| 41 | pub mod fmc; | 41 | pub mod fmc; |
| 42 | #[cfg(hrtim)] | 42 | #[cfg(hrtim)] |
| 43 | pub mod hrtim; | 43 | pub mod hrtim; |
| 44 | #[cfg(i2c)] | 44 | #[cfg(all(i2c, any(i2c_v1, all(i2c_v2, feature = "time"))))] |
| 45 | pub mod i2c; | 45 | pub mod i2c; |
| 46 | #[cfg(all(spi_v1, rcc_f4))] | 46 | #[cfg(all(spi_v1, rcc_f4))] |
| 47 | pub mod i2s; | 47 | pub mod i2s; |
