TI-RTOS Drivers
tidrivers_cc32xx_2_16_01_13
|
I2C driver implementation for a CC3200 I2C controller.
============================================================================
The I2C header file should be included in an application as follows:
Refer to I2C.h for a complete description of APIs & example of use.
#include <stdint.h>
#include <stdbool.h>
#include <ti/drivers/I2C.h>
#include <ti/drivers/ports/HwiP.h>
#include <ti/drivers/ports/SemaphoreP.h>
#include <ti/drivers/Power.h>
Go to the source code of this file.
Data Structures | |
struct | I2CCC3200_HWAttrs |
I2CCC3200 Hardware attributes. More... | |
struct | I2CCC3200_Object |
I2CCC3200 Object. More... | |
Typedefs | |
typedef enum I2CCC3200_Mode | I2CCC3200_Mode |
I2CCC3200 mode. More... | |
typedef struct I2CCC3200_HWAttrs | I2CCC3200_HWAttrs |
I2CCC3200 Hardware attributes. More... | |
typedef struct I2CCC3200_Object | I2CCC3200_Object |
I2CCC3200 Object. More... | |
Enumerations | |
enum | I2CCC3200_Mode { I2CCC3200_IDLE_MODE = 0, I2CCC3200_WRITE_MODE, I2CCC3200_READ_MODE, I2CCC3200_ERROR = 0xFF } |
I2CCC3200 mode. More... | |
Variables | |
const I2C_FxnTable | I2CCC3200_fxnTable |
typedef enum I2CCC3200_Mode I2CCC3200_Mode |
I2CCC3200 mode.
This enum defines the state of the I2C driver's state-machine. Do not modify.
typedef struct I2CCC3200_HWAttrs I2CCC3200_HWAttrs |
I2CCC3200 Hardware attributes.
The baseAddr and intNum fields are used by driverlib APIs and therefore must be populated by driverlib macro definitions. For CC3200Ware these definitions are found in:
intPriority is the I2C peripheral's interrupt priority, as defined by the underlying OS. It is passed unmodified to the underlying OS's interrupt handler creation code, so you need to refer to the OS documentation for usage. For example, for SYS/BIOS applications, refer to the ti.sysbios.family.arm.m3.Hwi documentation for SYS/BIOS usage of interrupt priorities. If the driver uses the ti.drivers.ports interface instead of making OS calls directly, then the HwiP port handles the interrupt priority in an OS specific way. In the case of the SYS/BIOS port, intPriority is passed unmodified to Hwi_create().
A sample structure is shown below:
typedef struct I2CCC3200_Object I2CCC3200_Object |
I2CCC3200 Object.
The application must not access any member variables of this structure!
enum I2CCC3200_Mode |
const I2C_FxnTable I2CCC3200_fxnTable |