320 #ifndef ti_drivers_I2C__include 321 #define ti_drivers_I2C__include 348 #define I2C_CMD_RESERVED (32) 362 #define I2C_STATUS_RESERVED (-32) 377 #define I2C_STATUS_SUCCESS (0) 385 #define I2C_STATUS_ERROR (-1) 394 #define I2C_STATUS_UNDEFINEDCMD (-2) 503 bool transferStatus);
651 extern void I2C_close(I2C_Handle handle);
690 extern int_fast16_t
I2C_control(I2C_Handle handle, uint_fast16_t cmd,
I2C Parameters.
Definition: I2C.h:534
size_t readCount
Definition: I2C.h:443
Structure used to perform I2C bus transfers.
Definition: I2C.h:431
I2C_BitRate_
Specifies the standard I2C bus bit rate.
Definition: I2C.h:512
void * object
Definition: I2C.h:614
I2C_OpenFxn openFxn
Definition: I2C.h:594
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:556
void * nextPtr
Definition: I2C.h:452
I2C_TransferMode transferMode
Definition: I2C.h:536
void(* I2C_InitFxn)(I2C_Handle handle)
A function pointer to a driver-specific implementation of I2C_init().
Definition: I2C.h:569
struct I2C_Transaction_ I2C_Transaction
Structure used to perform I2C bus transfers.
struct I2C_Config_ * I2C_Handle
A handle that is returned from an I2C_open() call.
Definition: I2C.h:414
size_t writeCount
Definition: I2C.h:437
void const * hwAttrs
Definition: I2C.h:617
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:591
void(* I2C_CancelFxn)(I2C_Handle handle)
A function pointer to a driver-specific implementation of I2C_cancel().
Definition: I2C.h:550
struct I2C_Params_ I2C_Params
I2C Parameters.
void * readBuf
Definition: I2C.h:440
I2C_InitFxn initFxn
Definition: I2C.h:593
I2C_CancelFxn cancelFxn
Definition: I2C.h:590
I2C_TransferMode_
Specifies the behavior of I2C_Transfer().
Definition: I2C.h:460
enum I2C_TransferMode_ I2C_TransferMode
Specifies the behavior of I2C_Transfer().
I2C_CallbackFxn transferCallbackFxn
Definition: I2C.h:539
bool(* I2C_TransferFxn)(I2C_Handle handle, I2C_Transaction *transaction)
A function pointer to a driver-specific implementation of I2C_transfer().
Definition: I2C.h:581
I2C_Handle I2C_open(uint_least8_t index, I2C_Params *params)
Open an I2C instance.
The definition of an I2C function table that contains the required set of functions to control a spec...
Definition: I2C.h:589
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 the standard I2C bus bit rate.
void I2C_close(I2C_Handle handle)
Close an I2C driver instance specified by an I2C_Handle.
I2C_BitRate bitRate
Definition: I2C.h:541
void * writeBuf
Definition: I2C.h:434
struct I2C_Config_ I2C_Config
I2C global configuration.
void I2C_cancel(I2C_Handle handle)
Cancels all I2C transfers.
void * arg
Definition: I2C.h:449
uint_least8_t slaveAddress
Definition: I2C.h:445
I2C global configuration.
Definition: I2C.h:609
void(* I2C_CallbackFxn)(I2C_Handle handle, I2C_Transaction *transaction, bool transferStatus)
I2C callback function prototype.
Definition: I2C.h:502
void I2C_init(void)
Initializes the I2C module.
I2C_FxnTable const * fxnTablePtr
Definition: I2C.h:611
void * custom
Definition: I2C.h:543
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:562
I2C_ControlFxn controlFxn
Definition: I2C.h:592
I2C_Handle(* I2C_OpenFxn)(I2C_Handle handle, I2C_Params *params)
A function pointer to a driver-specific implementation of I2C_open().
Definition: I2C.h:575
I2C_TransferFxn transferFxn
Definition: I2C.h:595