TI-RTOS Drivers  tidrivers_full_2_20_00_08
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
I2SCC3200DMA.h File Reference

Detailed Description

I2S driver implementation for a CC3200 I2S controller.

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

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

Refer to I2S.h for a complete description of APIs & example of use.


#include <stdint.h>
#include <stdbool.h>
#include <ti/drivers/I2S.h>
#include <ti/drivers/ports/HwiP.h>
#include <ti/drivers/ports/SemaphoreP.h>
#include <ti/drivers/utils/List.h>
#include <ti/drivers/dma/UDMACC3200.h>
Include dependency graph for I2SCC3200DMA.h:

Go to the source code of this file.

Data Structures

struct  I2SCC3200DMA_HWAttrs
 I2SCC3200DMA Hardware attributes. More...
 
struct  I2SCC3200DMA_SerialPinConfig
 CC3200 Serial Pin Configuration. More...
 
struct  I2SCC3200DMA_SerialPinParams
 CC3200 specific I2S Parameters. More...
 
struct  I2SCC3200DMA_SerialPinVars
 I2SCC3200DMA Serial pin variables. More...
 
struct  I2SCC3200DMA_Object
 I2SCC3200DMA Object. More...
 

Macros

#define I2SCC3200DMA_CMD_SET_ZEROBUF_LEN   I2S_CMD_RESERVED + 0
 
#define I2SCC3200DMA_CMD_SET_EMPTYBUF_LEN   I2S_CMD_RESERVED + 1
 
#define I2SCC3200DMA_SET_ZEROBUF_LEN   I2SCC3200DMA_CMD_SET_ZEROBUF_LEN
 
#define I2SCC3200DMA_SET_EMPTYBUF_LEN   I2SCC3200DMA_CMD_SET_EMPTYBUF_LEN
 
#define I2SCC3200DMA_INDEX_INVALID   0xFF
 
#define I2SCC3200DMA_NUM_SERIAL_PINS   2
 

Typedefs

typedef enum I2SCC3200DMA_DataSize I2SCC3200DMA_DataSize
 I2SCC3200DMA data size is used to determine how to configure the DMA data transfers. This field is to be only used internally. More...
 
typedef struct I2SCC3200DMA_HWAttrs I2SCC3200DMA_HWAttrs
 I2SCC3200DMA Hardware attributes. More...
 
typedef struct I2SCC3200DMA_SerialPinConfig I2SCC3200DMA_SerialPinConfig
 CC3200 Serial Pin Configuration. More...
 
typedef struct I2SCC3200DMA_SerialPinParams I2SCC3200DMA_SerialPinParams
 CC3200 specific I2S Parameters. More...
 
typedef struct I2SCC3200DMA_SerialPinVars I2SCC3200DMA_SerialPinVars
 I2SCC3200DMA Serial pin variables. More...
 
typedef struct I2SCC3200DMA_Object I2SCC3200DMA_Object
 I2SCC3200DMA Object. More...
 
typedef struct I2SCC3200DMA_ObjectI2SCC3200DMA_Handle
 

Enumerations

enum  I2SCC3200DMA_DataSize {
  I2SCC3200DMA_16bit = 0,
  I2SCC3200DMA_32bit = 1
}
 I2SCC3200DMA data size is used to determine how to configure the DMA data transfers. This field is to be only used internally. More...
 

Functions

void I2SCC3200DMA_Params_init (I2SCC3200DMA_SerialPinParams *params)
 Function to initialize the I2S_Params struct to its defaults. More...
 

Variables

const I2S_FxnTable I2SCC3200DMA_fxnTable
 

Macro Definition Documentation

#define I2SCC3200DMA_SET_ZEROBUF_LEN   I2SCC3200DMA_CMD_SET_ZEROBUF_LEN
#define I2SCC3200DMA_SET_EMPTYBUF_LEN   I2SCC3200DMA_CMD_SET_EMPTYBUF_LEN
#define I2SCC3200DMA_INDEX_INVALID   0xFF
#define I2SCC3200DMA_NUM_SERIAL_PINS   2

Typedef Documentation

I2SCC3200DMA data size is used to determine how to configure the DMA data transfers. This field is to be only used internally.

I2SCC3200DMA_16bit: txBuf and rxBuf are arrays of uint16_t elements I2SCC3200DMA_32bit: txBuf and rxBuf are arrays of uint32_t elements

I2SCC3200DMA Hardware attributes.

These fields, with the exception of intPriority, are used by driverlib APIs and therefore must be populated by driverlib macro definitions. For CC3200Ware these definitions are found in:

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

intPriority is the I2S 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:

1 const I2SCC3200DMA_HWAttrs i2sCC3200HWAttrs[] = {
2  {
3  .baseAddr = I2S_BASE,
4  .intNum = INT_I2S,
5  .intPriority = (~0),
6  .rxChannelIndex = UDMA_CH4_I2S_RX,
7  .txChannelIndex = UDMA_CH5_I2S_TX
8  }
9 };

CC3200 Serial Pin Configuration.

CC3200 specific I2S Parameters.

I2SCC3200DMA Serial pin variables.

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

I2SCC3200DMA Object.

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

Enumeration Type Documentation

I2SCC3200DMA data size is used to determine how to configure the DMA data transfers. This field is to be only used internally.

I2SCC3200DMA_16bit: txBuf and rxBuf are arrays of uint16_t elements I2SCC3200DMA_32bit: txBuf and rxBuf are arrays of uint32_t elements

Enumerator
I2SCC3200DMA_16bit 
I2SCC3200DMA_32bit 

Function Documentation

void I2SCC3200DMA_Params_init ( I2SCC3200DMA_SerialPinParams params)

Function to initialize the I2S_Params struct to its defaults.

params->serialPinConfig[0].pinNumber = 0; params->serialPinConfig[0].pinMode = I2S_PINMODE_RX; params->serialPinConfig[0].inActiveConfig = I2S_SERCONFIG_INACT_LOW_LEVEL;

params->serialPinConfig[1].pinNumber = 1; params->serialPinConfig[1].pinMode = I2S_PINMODE_TX; params->serialPinConfig[1].inActiveConfig = I2S_SERCONFIG_INACT_LOW_LEVEL;

Parameters
paramsParameter structure to initialize

Variable Documentation

const I2S_FxnTable I2SCC3200DMA_fxnTable
Copyright 2016, Texas Instruments Incorporated