Struct stm32f1xx_hal::i2c::blocking::BlockingI2c
source · pub struct BlockingI2c<I2C, PINS> { /* private fields */ }
Expand description
embedded-hal compatible blocking I2C implementation
NOTE: Before using blocking I2C, you need to enable the DWT cycle counter using the DWT::enable_cycle_counter method.
Implementations§
source§impl<PINS> BlockingI2c<I2C1, PINS>
impl<PINS> BlockingI2c<I2C1, PINS>
sourcepub fn i2c1<M: Into<Mode>>(
i2c: I2C1,
pins: PINS,
mapr: &mut MAPR,
mode: M,
clocks: Clocks,
start_timeout_us: u32,
start_retries: u8,
addr_timeout_us: u32,
data_timeout_us: u32
) -> Selfwhere
PINS: Pins<I2C1>,
pub fn i2c1<M: Into<Mode>>(
i2c: I2C1,
pins: PINS,
mapr: &mut MAPR,
mode: M,
clocks: Clocks,
start_timeout_us: u32,
start_retries: u8,
addr_timeout_us: u32,
data_timeout_us: u32
) -> Selfwhere
PINS: Pins<I2C1>,
Creates a blocking I2C1 object on pins PB6 and PB7 or PB8 and PB9 using the embedded-hal BlockingI2c
trait.