diff --git a/esp-hal/src/i2c/master/lp_i2c.rs b/esp-hal/src/i2c/lp_i2c.rs similarity index 100% rename from esp-hal/src/i2c/master/lp_i2c.rs rename to esp-hal/src/i2c/lp_i2c.rs diff --git a/esp-hal/src/i2c/master/mod.rs b/esp-hal/src/i2c/master/mod.rs index 617a95611a..d767c6a9f6 100644 --- a/esp-hal/src/i2c/master/mod.rs +++ b/esp-hal/src/i2c/master/mod.rs @@ -1434,6 +1434,3 @@ impl Instance for AnyI2c { } } } - -#[cfg(lp_i2c0)] -pub mod lp_i2c; diff --git a/esp-hal/src/i2c/mod.rs b/esp-hal/src/i2c/mod.rs index 0500f1eeb7..69d84bc557 100644 --- a/esp-hal/src/i2c/mod.rs +++ b/esp-hal/src/i2c/mod.rs @@ -6,3 +6,6 @@ //! (SDA) and serial clock line (SCL), pulled up by resistors. pub mod master; + +#[cfg(lp_i2c0)] +pub mod lp_i2c; diff --git a/examples/src/bin/embassy_i2c.rs b/examples/src/bin/embassy_i2c.rs index 3f9604fcfd..5ec0d529c8 100644 --- a/examples/src/bin/embassy_i2c.rs +++ b/examples/src/bin/embassy_i2c.rs @@ -19,7 +19,7 @@ use embassy_executor::Spawner; use embassy_time::{Duration, Timer}; use esp_backtrace as _; -use esp_hal::{gpio::Io, i2c::master::I2c, prelude::*, timer::timg::TimerGroup}; +use esp_hal::{gpio::Io, i2c::master::I2c, timer::timg::TimerGroup}; use lis3dh_async::{Lis3dh, Range, SlaveAddr}; #[esp_hal_embassy::main] diff --git a/examples/src/bin/embassy_i2c_bmp180_calibration_data.rs b/examples/src/bin/embassy_i2c_bmp180_calibration_data.rs index a3e6cf982c..4e135dd493 100644 --- a/examples/src/bin/embassy_i2c_bmp180_calibration_data.rs +++ b/examples/src/bin/embassy_i2c_bmp180_calibration_data.rs @@ -20,7 +20,7 @@ use embassy_executor::Spawner; use embassy_time::{Duration, Timer}; use esp_backtrace as _; -use esp_hal::{gpio::Io, i2c::master::I2c, prelude::*, timer::timg::TimerGroup}; +use esp_hal::{gpio::Io, i2c::master::I2c, timer::timg::TimerGroup}; #[esp_hal_embassy::main] async fn main(_spawner: Spawner) {