aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Oliva <[email protected]>2023-10-11 23:05:12 +0200
committerAndres Oliva <[email protected]>2023-10-11 23:05:12 +0200
commitb6c0ddb7df86a8c5531ef6ae4c026b2e7175c96b (patch)
treeb1737fd2ea53847594ed902ae36e614f6bbc9b84
parentee93bbf1d45226ae71234287c382bf1ed530ca97 (diff)
Move the feature gates to the i2c module instead of the pub use statement
-rw-r--r--embassy-stm32/src/i2c/mod.rs2
-rw-r--r--embassy-stm32/src/lib.rs2
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")]
9mod _version; 9mod _version;
10
11#[cfg(any(i2c_v1, all(i2c_v2, feature = "time")))]
12pub use _version::*; 10pub use _version::*;
13 11
14use crate::peripherals; 12use 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;
41pub mod fmc; 41pub mod fmc;
42#[cfg(hrtim)] 42#[cfg(hrtim)]
43pub mod hrtim; 43pub mod hrtim;
44#[cfg(i2c)] 44#[cfg(all(i2c, any(i2c_v1, all(i2c_v2, feature = "time"))))]
45pub mod i2c; 45pub mod i2c;
46#[cfg(all(spi_v1, rcc_f4))] 46#[cfg(all(spi_v1, rcc_f4))]
47pub mod i2s; 47pub mod i2s;