[−][src]Function wpilib_sys::bindings::HAL_TransactionI2C
pub unsafe extern "C" fn HAL_TransactionI2C(
port: Type,
deviceAddress: i32,
dataToSend: *const u8,
sendSize: i32,
dataReceived: *mut u8,
receiveSize: i32
) -> i32
Generic I2C read/write transaction.
This is a lower-level interface to the I2C hardware giving you more control over each transaction.
@param port The I2C port, 0 for the on-board, 1 for the MXP. @param dataToSend Buffer of data to send as part of the transaction. @param sendSize Number of bytes to send as part of the transaction. @param dataReceived Buffer to read data into. @param receiveSize Number of bytes to read from the device. @return >= 0 on success or -1 on transfer abort.