Вы здесь

U2C_GetByte()

U2C_RESULT U2C_GetByte(
      HANDLE hDevice,
      BYTE* pData
);

The U2C_GetByte() function shifts in (reads) a single byte from I2C bus. It assumes that the bus is available, Start Condition has been previously generated and the slave device has been properly addressed. This function doesn't generate acknowledge, so you must call the U2C_PutAck() function or use U2C_GetByteWithAck() instead ofU2C_GetByte() function. This function can be called several times to implement custom I2C-like protocol. The function does not finish 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.

pData

A pointer to byte to be filled with data read from the I2C bus.

Return values:

U2C_SUCCESS

Byte was successfully read from I2C bus.

U2C_HARDWARE_NOT_FOUND

U2C-12 device referenced by hDevice handle was not found.

Rating: 
Голосов пока нет

Языки

Вход на сайт