I2C driver implementation for a CC32XX I2C controller.
The I2C header file should be included in an application as follows:
Refer to I2C.h for a complete description of APIs and usage.
#include <stdint.h>
#include <stdbool.h>
#include <ti/drivers/I2C.h>
#include <ti/drivers/dpl/HwiP.h>
#include <ti/drivers/dpl/SemaphoreP.h>
#include <ti/drivers/Power.h>
Go to the source code of this file.
Data Structures | |
struct | I2CCC32XX_HWAttrsV1 |
I2CCC32XX Hardware attributes. More... | |
Macros | |
#define | I2CCC32XX_PIN_01_I2C_SCL 0x100 |
#define | I2CCC32XX_PIN_02_I2C_SDA 0x101 |
#define | I2CCC32XX_PIN_03_I2C_SCL 0x502 |
#define | I2CCC32XX_PIN_04_I2C_SDA 0x503 |
#define | I2CCC32XX_PIN_05_I2C_SCL 0x504 |
#define | I2CCC32XX_PIN_06_I2C_SDA 0x505 |
#define | I2CCC32XX_PIN_16_I2C_SCL 0x90F |
#define | I2CCC32XX_PIN_17_I2C_SDA 0x910 |
Typedefs | |
typedef struct I2CCC32XX_HWAttrsV1 | I2CCC32XX_HWAttrsV1 |
I2CCC32XX Hardware attributes. More... | |
Variables | |
const I2C_FxnTable | I2CCC32XX_fxnTable |
#define I2CCC32XX_PIN_01_I2C_SCL 0x100 |
PIN 1 is used for I2C_SCL
#define I2CCC32XX_PIN_02_I2C_SDA 0x101 |
PIN 2 is used for I2C_SDA
#define I2CCC32XX_PIN_03_I2C_SCL 0x502 |
PIN 3 is used for I2C_SCL
#define I2CCC32XX_PIN_04_I2C_SDA 0x503 |
PIN 4 is used for I2C_SDA
#define I2CCC32XX_PIN_05_I2C_SCL 0x504 |
PIN 5 is used for I2C_SCL
#define I2CCC32XX_PIN_06_I2C_SDA 0x505 |
PIN 6 is used for I2C_SDA
#define I2CCC32XX_PIN_16_I2C_SCL 0x90F |
PIN 16 is used for I2C_SCL
#define I2CCC32XX_PIN_17_I2C_SDA 0x910 |
PIN 17 is used for I2C_SDA
typedef struct I2CCC32XX_HWAttrsV1 I2CCC32XX_HWAttrsV1 |
I2CCC32XX Hardware attributes.
The baseAddr and intNum fields define the base address and interrupt number of the I2C peripheral. These values are used by driverlib APIs and therefore must be populated by driverlib macro definitions. These definitions are found in the header files:
intPriority is the I2C peripheral's interrupt priority. This driver uses the ti.dpl interface instead of making OS calls directly, and the corresponding HwiP port handles the interrupt priority in an OS-specific way. For example, in the case of the TI-RTOS kernel port, the intPriority is passed unmodified to Hwi_create() provided by the ti.sysbios.family.arm.m3.Hwi module; so the documentation for the ti.sysbios.family.arm.m3.Hwi module should be referenced for a description of usage of priority.
clkPin and dataPin define the pin multiplexing to be used for the SCL and SDA pins, respectively. Macro values defined in this header file should be used for these fields.
A sample structure is shown below:
const I2C_FxnTable I2CCC32XX_fxnTable |