U2C_RESULT U2C_PutByteWithAck( HANDLE hDevice, BYTE Data );
The U2C_PutByteWithAck() function shifts out (transmits) a single byte to I2C bus and checks for acknowledge from I2C slave device. It assumes that the bus is available and Start Condition has been generated first. This function can be called several times to implement custom I2C-like protocol. The function does not finish the I2C bus transaction after transmission, so at the end of I2C transaction U2C_Stop() function has to be called.
Parameters:
- hDevice
Handle to the U2C-12 device.
- Data
Byte value to be transmitted to the I2C bus.
Return values:
U2C_SUCCESS
Byte was successfully transmitted to the I2C bus and I2C slave device provided acknowledge.
U2C_HARDWARE_NOT_FOUND
U2C-12 device referenced by hDevice handle was not found.
U2C_NO_ACK
I2C slave device did not acknowledge the transmitted byte.