Move the feature gates to the i2c module instead of the pub use statement

This commit is contained in:
Andres Oliva 2023-10-11 23:05:12 +02:00
parent ee93bbf1d4
commit b6c0ddb7df
2 changed files with 1 additions and 3 deletions

View File

@ -7,8 +7,6 @@ use crate::interrupt;
#[cfg_attr(i2c_v1, path = "v1.rs")] #[cfg_attr(i2c_v1, path = "v1.rs")]
#[cfg_attr(all(i2c_v2, feature = "time"), path = "v2.rs")] #[cfg_attr(all(i2c_v2, feature = "time"), path = "v2.rs")]
mod _version; mod _version;
#[cfg(any(i2c_v1, all(i2c_v2, feature = "time")))]
pub use _version::*; pub use _version::*;
use crate::peripherals; use crate::peripherals;

View File

@ -41,7 +41,7 @@ pub mod flash;
pub mod fmc; pub mod fmc;
#[cfg(hrtim)] #[cfg(hrtim)]
pub mod hrtim; pub mod hrtim;
#[cfg(i2c)] #[cfg(all(i2c, any(i2c_v1, all(i2c_v2, feature = "time"))))]
pub mod i2c; pub mod i2c;
#[cfg(all(spi_v1, rcc_f4))] #[cfg(all(spi_v1, rcc_f4))]
pub mod i2s; pub mod i2s;