Perform an I2C master write/read transaction
int gf_i2c_writeread ( gf_dev_t gdev,
uint8_t * odata,
uint8_t * idata,
int ibytes );
- The handle for the graphics device to perform the transaction on. This is the handle acquired by gf_dev_attach().
- Index of the I2C bus, on which this device is capable of being a master.
- The address of the I2C slave device.
- A pointer to a buffer where the outgoing data is stored.
- The number of bytes to write. The maximum is 128 bytes.
- A pointer to a buffer where the function can store the incoming data.
- The number of bytes to read. The maximum is 128 bytes.
This function performs an I2C master write/read transaction. The transaction performed is what the I2C specification refers to as a combined transfer format. This is typically used to write a register or memory subaddress to the device, followed by a read transfer from that register/memory.
- The busno index is out of range for the specified device.
- Error communicating with io-display. Check to ensure that io-display is still running. The sloginfo utility may provide more information.
- Hardware error reading from the slave device. The sloginfo utility may provide more information.
- The number of bytes requested to be read (ibytes) or written (obytes) is larger than the maximum of 128.
QNX Graphics Framework