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

pub unsafe extern "C" fn hal_i2c_master_write(
    i2c_num: u8,
    pdata: *mut hal_i2c_master_data,
    timeout: u32,
    last_op: u8
) -> c_int

Sends a start condition and writes bytes of data on the i2c bus. This API does NOT issue a stop condition unless last_op is set to 1. You must stop the bus after successful or unsuccessful write attempts. This API is blocking until an error or NaK occurs. Timeout is platform dependent.

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