U2C_RESULT U2C_PutByte (
HANDLE hDevice,
BYTE Data
);
The U2C_PutByte function shifts out (transmits) a single byte to the I2C bus. It assumes that the bus is available and the Start Condition has been generated first. This function doesn't check acknowledge from the I2C slave device, so you must call U2C_GetAck() to check acknowledge or to use U2C_PutByteWithAck() instead of U2C_PutByte function. 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. |
| U2C_HARDWARE_NOT_FOUND | U2C-12 device referenced by hDevice handle was not found. |
|