Features Supported
- Controller and Target mode of operation
- Interrupt, Polled Mode
- Blocking and Non-blocking (callback) transfers
- Queueing of I2C transactions
- I2C Bus Recovery
SysConfig Features
- Note
- It is strongly recommend to use SysConfig where it is available instead of using direct SW API calls. This will help simplify the SW application and also catch common mistakes early in the development cycle.
SysConfig can be used to configure below parameters apart from common configuration like Clock,MPU,RAT and others.
- I2C module configuration parmaters like bitrate, target addresses to probe.
- I2C instances and pin configurations.
- Interrupt mode enable option.If you disable it, configures to polling mode.
- Based on above parameters, the SysConfig generated code does below as part of Drivers_open and Drivers_close functions
- Set I2C instance parameter configuration.
- Driver ISR registration if Interrupt Mode is enabled.
Features NOT Supported
- Target mode is not supported in polling mode.
Usage Overview
API Sequence
Needs Work
Initializing the I2C HLD Driver
Needs Work
Important Usage Guidelines
NA
Example Usage
Include the below file to access the APIs
Instance Open Example
gI2cHandle =
I2C_open(CONFIG_I2C0, ¶ms);
if (!gI2cHandle) {
}
Instance Close Example
I2c Transfer Example
API
APIs for I2C HLD