TI-RTOS Drivers
tidrivers_full_2_20_00_08
|
I2C driver implementation for a Tiva 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/sysbios/knl/Semaphore.h>
#include <ti/sysbios/family/arm/m3/Hwi.h>
Go to the source code of this file.
Data Structures | |
struct | I2CTiva_HWAttrs |
I2CTiva Hardware attributes. More... | |
struct | I2CTiva_Object |
I2CTiva Object. More... | |
Macros | |
#define | ti_sysbios_family_arm_m3_Hwi__nolocalnames |
Typedefs | |
typedef enum I2CTiva_Mode | I2CTiva_Mode |
I2CTiva mode. More... | |
typedef struct I2CTiva_HWAttrs | I2CTiva_HWAttrs |
I2CTiva Hardware attributes. More... | |
typedef struct I2CTiva_Object | I2CTiva_Object |
I2CTiva Object. More... | |
Enumerations | |
enum | I2CTiva_Mode { I2CTiva_IDLE_MODE = 0, I2CTiva_WRITE_MODE, I2CTiva_READ_MODE, I2CTiva_ERROR = 0xFF } |
I2CTiva mode. More... | |
Variables | |
const I2C_FxnTable | I2CTiva_fxnTable |
#define ti_sysbios_family_arm_m3_Hwi__nolocalnames |
typedef enum I2CTiva_Mode I2CTiva_Mode |
I2CTiva mode.
This enum defines the state of the I2C driver's state-machine. Do not modify.
typedef struct I2CTiva_HWAttrs I2CTiva_HWAttrs |
I2CTiva Hardware attributes.
The baseAddr and intNum fields are used by driverlib APIs and therefore must be populated by driverlib macro definitions. For TivaWare these definitions are found in:
intPriority is the I2C peripheral's interrupt priority, as defined by the underlying OS. In the case of SYS/BIOS, intPriority is passed unmodified to Hwi_create().
A sample structure is shown below:
typedef struct I2CTiva_Object I2CTiva_Object |
I2CTiva Object.
The application must not access any member variables of this structure!
enum I2CTiva_Mode |
const I2C_FxnTable I2CTiva_fxnTable |