[][src]Function d1_mini::i2c_master

pub fn i2c_master<TIM>(
    d1: Gpio5<Input<Floating>>,
    d2: Gpio4<Input<Floating>>,
    timer: TIM
) -> I2cBB<Gpio5<Output<OpenDrain>>, Gpio4<Output<OpenDrain>>, TIM> where
    TIM: CountDown + Periodic, 

Convenience function for setting up the D1/D2 pins to operate as I²C SCL/SDA respectively.

Since the ESP8266 does not have any I²C hardware, we accomplish this using bitbang-hal. The official documentation lists D1/D2 as SCL/SDA respectively, so by default we will use these pins, but you can use whichever you like in practice.