Structure used to perform I2C bus transfers. More...
#include <I2C.h>
Data Fields | |
void * | writeBuf |
size_t | writeCount |
void * | readBuf |
size_t | readCount |
uint_least8_t | slaveAddress |
void * | arg |
void * | nextPtr |
Structure used to perform I2C bus transfers.
The application is responsible for allocating and initializing an I2C_Transaction structure prior to passing it to I2C_Transfer(). This structure must persist in memory unmodified until the transfer is complete. This driver will always perform write operations first. Transmission of the I2C slave address with the appropriate read/write bit is handled internally by this driver.
void* I2C_Transaction_::writeBuf |
Pointer to a buffer of at least writeCount
bytes. If writeCount
is 0, this pointer may remain uninitialized.
size_t I2C_Transaction_::writeCount |
Number of bytes to write to the I2C slave device. A value of 0 indicates no data will be written to the slave device.
void* I2C_Transaction_::readBuf |
Pointer to a buffer of at least readCount
bytes. If readCount
is 0, this pointer may remain uninitialized.
size_t I2C_Transaction_::readCount |
Number of bytes to read from the I2C slave device. A value of 0 indicates no data will be read from the slave device.
uint_least8_t I2C_Transaction_::slaveAddress |
I2C slave address of the slave device
void* I2C_Transaction_::arg |
Optional application argument. This argument will be passed to the callback function specified by I2C_Params.transferCallbackFxn when using I2C_MODE_CALLBACK.
void* I2C_Transaction_::nextPtr |
This is reserved for use by the driver and must never be modified by the application.