Data Fields
I2C_Transaction_ Struct Reference

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
 

Detailed Description

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.

Note
I2C_Transaction structures cannot be re-used until the previous transaction has completed.
See also
I2C_transfer()

Field Documentation

§ writeBuf

void* I2C_Transaction_::writeBuf

Pointer to a buffer of at least writeCount bytes. If writeCount is 0, this pointer may remain uninitialized.

§ writeCount

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.

§ readBuf

void* I2C_Transaction_::readBuf

Pointer to a buffer of at least readCount bytes. If readCount is 0, this pointer may remain uninitialized.

§ readCount

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.

§ slaveAddress

uint_least8_t I2C_Transaction_::slaveAddress

I2C slave address of the slave device

§ arg

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.

§ nextPtr

void* I2C_Transaction_::nextPtr

This is reserved for use by the driver and must never be modified by the application.


The documentation for this struct was generated from the following file:
© Copyright 1995-2018, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale