U2C_RESULT U2C_Write( HANDLE hDevice, PU2C_TRANSACTION pTransaction );
The U2C_Write() function writes up to 256 bytes into the I2C slave device.
Handle to the U2C-12 device.
Pointer to the U2C_TRANSACTION structure to be used during the I2C write transaction. Before calling the function this structure have to be filled:
- 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 I 2C slave device.
- MemoryAddress - must contain the internal I 2 C slave device address.
- nBufferLength - must contain the number of bytes to be written into the I 2 C slave device.
- Buffer - must contain the data to be written into the I 2 C slave device.
The data was successfully written into the I2C slave device.
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 internal address.
I2C slave did not acknowledge data output.