[][src]Function mynewt::hw::hal::hal_i2c_init_hw

pub unsafe extern "C" fn hal_i2c_init_hw(
    i2c_num: u8,
    cfg: *const hal_i2c_hw_settings
) -> c_int

Initialize I2C controller

This initializes I2C controller hardware before 1st use. Shall be called only once.

  • i2c_num: Number of I2C controller
  • cfg: Configuration

Return: 0 on success, non-zero error code on failure