Dimax English Dimax French Dimax English Dimax Translations
USB-I2C/SPI/GPIO Interface Adapter - U2C-12
Reference Manual

U2C_PutByteWithAck


U2C_RESULT U2C_PutByteWithAck (
            HANDLE hDevice,
             BYTE Data
);
 

The U2C_PutByteWithAck function shifts out (transmits) a single byte to the I2C bus and checks for acknowledge from I2C slave device. It assumes that the bus is available and the 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 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.
            Copyright DIMAX 2002-2012