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; #[cfg_attr(i2c_v1, path = "v1.rs")] #[cfg_attr(all(i2c_v2, feature = "time"), path = "v2.rs")] mod _version; - -#[cfg(any(i2c_v1, all(i2c_v2, feature = "time")))] pub use _version::*; 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; pub mod fmc; #[cfg(hrtim)] pub mod hrtim; -#[cfg(i2c)] +#[cfg(all(i2c, any(i2c_v1, all(i2c_v2, feature = "time"))))] pub mod i2c; #[cfg(all(spi_v1, rcc_f4))] pub mod i2s;