Synopsis
typedef struct {
  unsigned address;
  const unsigned char *tx;
  size_t txlen;
  unsigned char *rx;
  size_t rxlen;
} CTL_I2C_REQUEST_t;
Description

CTL_I2C_REQUEST_t is an I/O request block for an I2C transaction. Clients are not required to use this request block directly from the I2C API, but I2C drivers are required to implement I/O requests according to the block's members:

Structure
address
8-bit address for the I/O request. The low order bit is undefined when passed to the low-level I2C driver, and the I2C driver must correctly set or reset the R/W bit according to the request phase.
tx
A pointer to the data to write to the bus after the slave address is transmitted. If tx is zero, the driver must skip the write part of the I/O request.
txlen
The number of bytes to transfer as payload in the write part of the I/O request.
rx
A pointer to the data to read from the bus after the slave address is transmitted. If rx is zero, the driver must skip the read part of the I/O request.
rxlen
The number of bytes to transfer as payload in the read part of the I/O request.