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

pub unsafe extern "C" fn hal_i2c_init(i2c_num: u8, cfg: *mut c_void) -> c_int

Initialize a new i2c device with the I2C number.

  • i2c_num: The number of the I2C device being initialized
  • cfg: The hardware specific configuration structure to configure the I2C with. This includes things like pin configuration.

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