U2C_RESULT U2C_Read( HANDLE hDevice, PU2C_TRANSACTION pTransaction );
The U2C_Read function() reads up to 256 bytes from the I2C slave device.
Handle to the U2C-12 device.
Pointer to the U2C_TRANSACTION structure to be used during the I2C read transaction. Before calling the function this structure has to be partially filled:After successful completion of the read operation Buffer member of the structure will be filled with data read from I2C slave device.
- nSlaveDeviceAddress - must contain the I 2 C slave device address.
- nMemoryAddressLength - must contain the internal address length (in bytes from 0 up to 4). If nMemoryAddressLength is equal to 0, no address will be sent to device and repeated I 2 C start condition won't be generated.
- MemoryAddress - must contain the internal I 2 C slave device address.
- nBufferLength - must contain the number of bytes to be read from the I 2 C slave device.
The data was successfully read.
U2C-12 device referenced by hDevice handle was not found.
I2C slave device did not acknowledge write slave address.
I2C slave device did not acknowledge read slave address.
I2C slave device did not acknowledge internal address.