[−][src]Function wpilib_sys::bindings::HAL_ReadI2C
pub unsafe extern "C" fn HAL_ReadI2C(
port: Type,
deviceAddress: i32,
buffer: *mut u8,
count: i32
) -> i32
Executes a read transaction with the device.
Reads bytes from a device. Most I2C devices will auto-increment the register pointer internally allowing you to read consecutive registers on a device in a single transaction.
@param port The I2C port, 0 for the on-board, 1 for the MXP. @param registerAddress The register to read first in the transaction. @param count The number of bytes to read in the transaction. @param buffer A pointer to the array of bytes to store the data read from the device. @return >= 0 on success or -1 on transfer abort.