124 #ifndef ti_drivers_I2C__include
125 #define ti_drivers_I2C__include
152 #define I2C_CMD_RESERVED 32
166 #define I2C_STATUS_RESERVED -32
181 #define I2C_STATUS_SUCCESS 0
189 #define I2C_STATUS_ERROR -1
198 #define I2C_STATUS_UNDEFINEDCMD -2
347 I2C_Transaction *transaction);
427 extern void I2C_close(I2C_Handle handle);
466 extern int I2C_control(I2C_Handle handle,
unsigned int cmd,
void *arg);
556 extern bool I2C_transfer(I2C_Handle handle, I2C_Transaction *transaction);
void * writeBuf
Definition: I2C.h:231
void * arg
Definition: I2C.h:239
struct I2C_Config I2C_Config
I2C global configuration.
I2C_TransferMode transferMode
Definition: I2C.h:302
void * object
Definition: I2C.h:390
void * readBuf
Definition: I2C.h:234
void * nextPtr
Definition: I2C.h:240
I2C global configuration.
Definition: I2C.h:385
void I2C_Params_init(I2C_Params *params)
Initialize an I2C_Params struct to its defaults.
struct I2C_Config * I2C_Handle
A handle that is returned from a I2C_open() call.
Definition: I2C.h:218
void(* I2C_CloseFxn)(I2C_Handle handle)
A function pointer to a driver-specific implementation of I2C_close().
Definition: I2C.h:319
int I2C_control(I2C_Handle handle, unsigned int cmd, void *arg)
Perform implementation specific features on a given I2C_Handle.
void(* I2C_CallbackFxn)(I2C_Handle, I2C_Transaction *, bool)
I2C callback function.
Definition: I2C.h:268
void(* I2C_InitFxn)(I2C_Handle handle)
A function pointer to a driver-specific implementation of I2C_init().
Definition: I2C.h:333
I2C_BitRate
I2C bitRate.
Definition: I2C.h:276
void(* I2C_CancelFxn)(I2C_Handle handle)
A function pointer to a driver-specific implementation of I2C_cancel().
Definition: I2C.h:313
I2C_CancelFxn cancelFxn
Definition: I2C.h:356
I2C_TransferMode
I2C transfer mode.
Definition: I2C.h:250
I2C_CallbackFxn transferCallbackFxn
Definition: I2C.h:303
I2C_CloseFxn closeFxn
Definition: I2C.h:359
I2C_InitFxn initFxn
Definition: I2C.h:365
bool(* I2C_TransferFxn)(I2C_Handle handle, I2C_Transaction *transaction)
A function pointer to a driver-specific implementation of I2C_transfer().
Definition: I2C.h:346
The definition of an I2C function table that contains the required set of functions to control a spec...
Definition: I2C.h:354
uintptr_t custom
Definition: I2C.h:305
I2C_FxnTable const * fxnTablePtr
Definition: I2C.h:387
I2C_OpenFxn openFxn
Definition: I2C.h:368
struct I2C_FxnTable I2C_FxnTable
The definition of an I2C function table that contains the required set of functions to control a spec...
I2C_TransferFxn transferFxn
Definition: I2C.h:371
I2C_BitRate bitRate
Definition: I2C.h:304
void I2C_close(I2C_Handle handle)
Close an I2C peripheral specified by an I2C handle.
I2C Parameters.
Definition: I2C.h:301
int(* I2C_ControlFxn)(I2C_Handle handle, unsigned int cmd, void *arg)
A function pointer to a driver-specific implementation of I2C_control().
Definition: I2C.h:325
I2C_ControlFxn controlFxn
Definition: I2C.h:362
struct I2C_Transaction I2C_Transaction
I2C transaction.
I2C_Handle I2C_open(unsigned int index, I2C_Params *params)
Initialize a given I2C peripheral specified by the particular index value. The parameter specifies wh...
void I2C_cancel(I2C_Handle handle)
Cancel all I2C transfers.
struct I2C_Params I2C_Params
I2C Parameters.
void I2C_init(void)
Initializes the I2C module.
unsigned char slaveAddress
Definition: I2C.h:237
void const * hwAttrs
Definition: I2C.h:393
I2C transaction.
Definition: I2C.h:230
bool I2C_transfer(I2C_Handle handle, I2C_Transaction *transaction)
Perform an I2C transaction with an I2C slave peripheral.
size_t writeCount
Definition: I2C.h:232
I2C_Handle(* I2C_OpenFxn)(I2C_Handle handle, I2C_Params *params)
A function pointer to a driver-specific implementation of I2C_open().
Definition: I2C.h:339
size_t readCount
Definition: I2C.h:235