[−][src]Function mynewt::hw::hal::hal_i2c_master_read
pub unsafe extern "C" fn hal_i2c_master_read(
i2c_num: u8,
pdata: *mut hal_i2c_master_data,
timeout: u32,
last_op: u8
) -> c_int
Sends a start condition and reads 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.
i2c_num: The number of the I2C device being written topdata: The location to place read datatimeout: How long to wait for transaction to complete in tickslast_op: Master should send a STOP at the end to signify end of transaction.
Return: 0 on success, and non-zero error code on failure