306 #ifndef ti_drivers_I2C__include 307 #define ti_drivers_I2C__include 334 #define I2C_CMD_RESERVED (32) 348 #define I2C_STATUS_RESERVED (-32) 363 #define I2C_STATUS_SUCCESS (0) 371 #define I2C_STATUS_ERROR (-1) 380 #define I2C_STATUS_UNDEFINEDCMD (-2) 476 bool transferStatus);
627 extern void I2C_close(I2C_Handle handle);
666 extern int_fast16_t
I2C_control(I2C_Handle handle, uint_fast16_t cmd,
I2C Parameters.
Definition: I2C.h:499
size_t readCount
Definition: I2C.h:417
This structure defines the I2C slave address, pointers to write and read buffers, and their associate...
Definition: I2C.h:411
I2C_BitRate_
Specifies one of the standard I2C bus bit rates for I2C communication. You must check that the device...
Definition: I2C.h:483
void * object
Definition: I2C.h:590
I2C_OpenFxn openFxn
Definition: I2C.h:568
void I2C_Params_init(I2C_Params *params)
Initialize an I2C_Params structure to its default values.
void(* I2C_CloseFxn)(I2C_Handle handle)
A function pointer to a driver-specific implementation of I2C_close().
Definition: I2C.h:521
void * nextPtr
Definition: I2C.h:425
I2C_TransferMode transferMode
Definition: I2C.h:500
void(* I2C_InitFxn)(I2C_Handle handle)
A function pointer to a driver-specific implementation of I2C_init().
Definition: I2C.h:534
struct I2C_Transaction_ I2C_Transaction
This structure defines the I2C slave address, pointers to write and read buffers, and their associate...
struct I2C_Config_ * I2C_Handle
A handle that is returned from an I2C_open() call.
Definition: I2C.h:400
size_t writeCount
Definition: I2C.h:414
void const * hwAttrs
Definition: I2C.h:593
int_fast16_t I2C_control(I2C_Handle handle, uint_fast16_t cmd, void *controlArg)
Perform implementation-specific features on a given I2C_Handle.
I2C_CloseFxn closeFxn
Definition: I2C.h:559
void(* I2C_CancelFxn)(I2C_Handle handle)
A function pointer to a driver-specific implementation of I2C_cancel().
Definition: I2C.h:515
struct I2C_Params_ I2C_Params
I2C Parameters.
void * readBuf
Definition: I2C.h:416
I2C_InitFxn initFxn
Definition: I2C.h:565
I2C_CancelFxn cancelFxn
Definition: I2C.h:556
I2C_TransferMode_
This I2C driver supports two transfer modes of operation: blocking and callback. The transfer mode is...
Definition: I2C.h:440
enum I2C_TransferMode_ I2C_TransferMode
This I2C driver supports two transfer modes of operation: blocking and callback. The transfer mode is...
I2C_CallbackFxn transferCallbackFxn
Definition: I2C.h:502
bool(* I2C_TransferFxn)(I2C_Handle handle, I2C_Transaction *transaction)
A function pointer to a driver-specific implementation of I2C_transfer().
Definition: I2C.h:546
I2C_Handle I2C_open(uint_least8_t index, I2C_Params *params)
Initialize a given I2C peripheral as identified by an index value. The I2C_Params structure defines t...
The definition of an I2C function table that contains the required set of functions to control a spec...
Definition: I2C.h:554
struct I2C_FxnTable_ I2C_FxnTable
The definition of an I2C function table that contains the required set of functions to control a spec...
enum I2C_BitRate_ I2C_BitRate
Specifies one of the standard I2C bus bit rates for I2C communication. You must check that the device...
void I2C_close(I2C_Handle handle)
Close an I2C peripheral specified by an I2C_Handle.
I2C_BitRate bitRate
Definition: I2C.h:505
void * writeBuf
Definition: I2C.h:412
struct I2C_Config_ I2C_Config
I2C global configuration.
void I2C_cancel(I2C_Handle handle)
Cancel all I2C transfers.
void * arg
Definition: I2C.h:421
uint_least8_t slaveAddress
Definition: I2C.h:419
I2C global configuration.
Definition: I2C.h:585
void(* I2C_CallbackFxn)(I2C_Handle handle, I2C_Transaction *transaction, bool transferStatus)
I2C callback function prototype. The application is responsible for declaring a callback function whe...
Definition: I2C.h:475
void I2C_init(void)
Initializes the I2C module.
I2C_FxnTable const * fxnTablePtr
Definition: I2C.h:587
void * custom
Definition: I2C.h:507
bool I2C_transfer(I2C_Handle handle, I2C_Transaction *transaction)
Perform an I2C transaction with an I2C slave peripheral.
int_fast16_t(* I2C_ControlFxn)(I2C_Handle handle, uint_fast16_t cmd, void *controlArg)
A function pointer to a driver-specific implementation of I2C_control().
Definition: I2C.h:527
I2C_ControlFxn controlFxn
Definition: I2C.h:562
I2C_Handle(* I2C_OpenFxn)(I2C_Handle handle, I2C_Params *params)
A function pointer to a driver-specific implementation of I2C_open().
Definition: I2C.h:540
I2C_TransferFxn transferFxn
Definition: I2C.h:571