esp_hal/i2c/
mod.rs

1//! # Inter-Integrated Circuit (I2C)
2//!
3//! I2C is a serial, synchronous, multi-device, half-duplex communication
4//! protocol that allows co-existence of multiple masters and slaves on the
5//! same bus. I2C uses two bidirectional open-drain lines: serial data line
6//! (SDA) and serial clock line (SCL), pulled up by resistors.
7//!
8//! For more information, see
9#![doc = crate::trm_markdown_link!("i2c")]
10
11pub mod master;
12
13#[cfg(lp_i2c0)]
14crate::unstable_module! {
15    pub mod lp_i2c;
16}
17
18crate::any_peripheral! {
19    /// Any I2C peripheral.
20    pub peripheral AnyI2c<'d> {
21        #[cfg(i2c0)]
22        I2c0(crate::peripherals::I2C0<'d>),
23        #[cfg(i2c1)]
24        I2c1(crate::peripherals::I2C1<'d>),
25    }
26}