|
AM64x MCU+ SDK
10.01.00
|
|
Go to the documentation of this file.
124 #define I2C_MAX_NUM_OWN_TARGET_ADDR (4U)
136 #define I2C_MODE_BLOCKING ((uint8_t) 0U)
137 #define I2C_MODE_CALLBACK ((uint8_t) 1U)
150 #define I2C_MEM_TXN_DIR_INVALID ((uint8_t) 0U)
152 #define I2C_MEM_TXN_DIR_TX ((uint8_t) 1U)
154 #define I2C_MEM_TXN_DIR_RX ((uint8_t) 2U)
170 typedef struct I2C_HwAttrs_s {
231 typedef struct I2C_Transaction_s {
290 typedef struct I2C_Params_s {
295 int32_t transferStatus);
305 typedef struct I2C_Object_s {
346 typedef struct I2C_Config_s {
370 int32_t transferStatus);
void I2C_Params_init(I2C_Params *params)
Function to set default values of I2C_Params in params.
void * arg
Definition: i2c.h:253
uint8_t memAddrSize
Definition: i2c.h:199
uint8_t * buffer
Definition: i2c.h:201
void I2C_Memory_Transaction_init(I2C_Mem_Transaction *memTransaction)
Function to set default values of I2C_Mem_Transaction in memTransaction.
I2C Object.
Definition: i2c.h:305
int32_t status
Definition: i2c.h:267
void * writeBuf
Definition: i2c.h:235
I2C Hardware attributes.
Definition: i2c.h:170
I2C_Transaction * tailPtr
Definition: i2c.h:324
uint16_t index
Definition: tisci_rm_proxy.h:3
I2C LLD Driver API/interface file.
int32_t I2C_probe(I2C_Handle handle, uint32_t targetAddr)
Function to probe I2C.
void * nextPtr
Definition: i2c.h:251
SemaphoreP_Object transferComplete
Definition: i2c.h:310
I2C Global configuration.
Definition: i2c.h:346
bool isOpen
Definition: i2c.h:326
I2CLLD_Object i2cLldObject
Definition: i2c.h:330
I2CLLD_Handle i2cLldHandle
Definition: i2c.h:331
I2C_Transaction * headPtr
Definition: i2c.h:322
I2C_HwAttrs const * hwAttrs
Definition: i2c.h:350
struct I2C_Config_s * I2C_Handle
A handle that is returned from a I2C_open() call.
Definition: i2c.h:165
uint32_t memAddr
Definition: i2c.h:197
bool enableIntr
Definition: i2c.h:180
int32_t I2C_recoverBus(I2C_Handle handle, uint32_t i2cDelay)
Function to recover the bus in case of error.
int32_t I2C_transfer(I2C_Handle handle, I2C_Transaction *transaction)
Function to initiate a transfer from I2C.
uint32_t targetAddress
Definition: i2c.h:249
uint32_t intStatusErr
Definition: i2c.h:328
I2C_Mem_Transaction * memTransaction
Definition: i2c.h:265
I2C transaction.
Definition: i2c.h:231
I2C Parameters.
Definition: i2c.h:290
I2C_Handle I2C_open(uint32_t idx, const I2C_Params *params)
Open the I2C at index idx with parameters params.
uint32_t size
Definition: i2c.h:203
SemaphoreP_Object mutex
Definition: i2c.h:308
uint8_t memDataDir
Definition: i2c.h:205
uint32_t timeout
Definition: i2c.h:255
bool expandSA
Definition: i2c.h:260
I2C_Params i2cParams
Definition: i2c.h:314
I2C_Object * object
Definition: i2c.h:348
uint32_t intNum
Definition: i2c.h:174
void I2C_Transaction_init(I2C_Transaction *transaction)
Function to set default values of I2C_Transaction in transaction.
bool controllerMode
Definition: i2c.h:257
int32_t I2C_setBusFrequency(I2C_Handle handle, uint32_t busFrequency)
Function to set the bus frequency.
void * readBuf
Definition: i2c.h:241
void I2C_deinit(void)
De-nitialize the I2C module.
Opaque Hwi object used with the Hwi APIs.
Definition: HwiP.h:93
size_t writeCount
Definition: i2c.h:238
void(* I2C_CallbackFxn)(I2C_Handle handle, I2C_Transaction *msg, int32_t transferStatus)
I2C callback function.
Definition: i2c.h:369
I2C Memory Transaction.
Definition: i2c.h:195
uint32_t baseAddr
Definition: i2c.h:172
Opaque semaphore object used with the semaphore APIs.
Definition: SemaphoreP.h:59
uint32_t eventId
Definition: i2c.h:176
uint32_t funcClk
Definition: i2c.h:178
bool memTxnEnable
Definition: i2c.h:263
size_t readCount
Definition: i2c.h:244
I2C Driver Object.
Definition: i2c_lld.h:381
void I2C_close(I2C_Handle handle)
Function to close the I2C Peripheral specified by the handle.
uint8_t state
Definition: i2c.h:316
uint8_t bitRate
Definition: i2c.h:297
I2C_Transaction * currentTransaction
Definition: i2c.h:319
uint8_t transferMode
Definition: i2c.h:292
void I2C_init(void)
Initialize the I2C module.
HwiP_Object hwiObj
Definition: i2c.h:312
#define I2C_MAX_NUM_OWN_TARGET_ADDR
Definition: i2c.h:124
I2C_Handle I2C_getHandle(uint32_t index)
This function returns the handle of an open I2C instance from the instance index.