TI-RTOS for SimpleLink Wireless MCUs  2.14.02.22
Data Structures | Macros | Typedefs | Enumerations | Variables
I2CTiva.h File Reference

Detailed Description

I2C driver implementation for a Tiva I2C controller.

============================================================================

The I2C header file should be included in an application as follows:


#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>
Include dependency graph for I2CTiva.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
 

Macro Definition Documentation

#define ti_sysbios_family_arm_m3_Hwi__nolocalnames

Typedef Documentation

typedef enum I2CTiva_Mode I2CTiva_Mode

I2CTiva mode.

This enum defines the state of the I2C driver's state-machine. Do not modify.

I2CTiva Hardware attributes.

These fields are used by driverlib APIs and therefore must be populated by driverlib macro definitions. For TivaWare these definitions are found in:

  • inc/hw_memmap.h
  • inc/hw_ints.h

A sample structure is shown below:

1 const I2CTiva_HWAttrs i2cTivaHWAttrs[] = {
2  {
3  .baseAddr = I2C1_BASE,
4  .intNum = INT_I2C1,
5  .intPriority = (~0)
6  },
7  {
8  .baseAddr = I2C3_BASE,
9  .intNum = INT_I2C3,
10  .intPriority = (~0)
11  },
12 };

I2CTiva Object.

The application must not access any member variables of this structure!

Enumeration Type Documentation

I2CTiva mode.

This enum defines the state of the I2C driver's state-machine. Do not modify.

Enumerator
I2CTiva_IDLE_MODE 
I2CTiva_WRITE_MODE 
I2CTiva_READ_MODE 
I2CTiva_ERROR 

Variable Documentation

const I2C_FxnTable I2CTiva_fxnTable
Copyright 2015, Texas Instruments Incorporated