Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
I2SCC32XXDMA.h File Reference

Detailed Description

I2S driver implementation for a CC32XX 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/dpl/HwiP.h>
#include <ti/drivers/dpl/SemaphoreP.h>
#include <ti/drivers/utils/List.h>
#include <ti/drivers/dma/UDMACC32XX.h>

Go to the source code of this file.

Data Structures

struct  I2SCC32XXDMA_HWAttrsV1
 I2SCC32XXDMA Hardware attributes. More...
 
struct  I2SCC32XXDMA_SerialPinConfig
 CC32XX Serial Pin Configuration. More...
 
struct  I2SCC32XXDMA_SerialPinParams
 CC32XX specific I2S Parameters. More...
 
struct  I2SCC32XXDMA_SerialPinVars
 I2SCC32XXDMA Serial pin variables. More...
 
struct  I2SCC32XXDMA_Object
 I2SCC32XXDMA Object. More...
 

Macros

#define I2SCC32XXDMA_PIN_02_McAFSX   0x0d01
 
#define I2SCC32XXDMA_PIN_03_McACLK   0x0302
 
#define I2SCC32XXDMA_PIN_15_McAFSX   0x070e
 
#define I2SCC32XXDMA_PIN_17_McAFSX   0x0610
 
#define I2SCC32XXDMA_PIN_21_McAFSX   0x0214
 
#define I2SCC32XXDMA_PIN_45_McAXR0   0x062c
 
#define I2SCC32XXDMA_PIN_45_McAFSX   0x0c2c
 
#define I2SCC32XXDMA_PIN_50_McAXR0   0x0431
 
#define I2SCC32XXDMA_PIN_50_McAXR1   0x0631
 
#define I2SCC32XXDMA_PIN_52_McACLK   0x0233
 
#define I2SCC32XXDMA_PIN_52_McAXR0   0x0433
 
#define I2SCC32XXDMA_PIN_53_McACLK   0x0234
 
#define I2SCC32XXDMA_PIN_53_McAFSX   0x0334
 
#define I2SCC32XXDMA_PIN_60_McAXR1   0x063b
 
#define I2SCC32XXDMA_PIN_62_McACLKX   0x0d3d
 
#define I2SCC32XXDMA_PIN_63_McAFSX   0x073e
 
#define I2SCC32XXDMA_PIN_64_McAXR0   0x073f
 
#define I2SCC32XXDMA_CMD_SET_ZEROBUF_LEN   (I2S_CMD_RESERVED + 0)
 
#define I2SCC32XXDMA_CMD_SET_EMPTYBUF_LEN   (I2S_CMD_RESERVED + 1)
 
#define I2SCC32XXDMA_SET_ZEROBUF_LEN   I2SCC32XXDMA_CMD_SET_ZEROBUF_LEN
 
#define I2SCC32XXDMA_SET_EMPTYBUF_LEN   I2SCC32XXDMA_CMD_SET_EMPTYBUF_LEN
 
#define I2SCC32XXDMA_INDEX_INVALID   0xFF
 
#define I2SCC32XXDMA_NUM_SERIAL_PINS   2
 

Typedefs

typedef enum I2SCC32XXDMA_DataSize I2SCC32XXDMA_DataSize
 I2SCC32XXDMA data size is used to determine how to configure the DMA data transfers. This field is to be only used internally. More...
 
typedef struct I2SCC32XXDMA_HWAttrsV1 I2SCC32XXDMA_HWAttrsV1
 I2SCC32XXDMA Hardware attributes. More...
 
typedef struct I2SCC32XXDMA_SerialPinConfig I2SCC32XXDMA_SerialPinConfig
 CC32XX Serial Pin Configuration. More...
 
typedef struct I2SCC32XXDMA_SerialPinParams I2SCC32XXDMA_SerialPinParams
 CC32XX specific I2S Parameters. More...
 
typedef struct I2SCC32XXDMA_SerialPinVars I2SCC32XXDMA_SerialPinVars
 I2SCC32XXDMA Serial pin variables. More...
 
typedef struct I2SCC32XXDMA_Object I2SCC32XXDMA_Object
 I2SCC32XXDMA Object. More...
 
typedef struct I2SCC32XXDMA_ObjectI2SCC32XXDMA_Handle
 

Enumerations

enum  I2SCC32XXDMA_DataSize { I2SCC32XXDMA_16bit = 0, I2SCC32XXDMA_32bit = 1 }
 I2SCC32XXDMA data size is used to determine how to configure the DMA data transfers. This field is to be only used internally. More...
 

Functions

void I2SCC32XXDMA_Params_init (I2SCC32XXDMA_SerialPinParams *params)
 Function to initialize the I2S_Params struct to its defaults. More...
 

Variables

const I2S_FxnTable I2SCC32XXDMA_fxnTable
 

Macro Definition Documentation

§ I2SCC32XXDMA_PIN_02_McAFSX

#define I2SCC32XXDMA_PIN_02_McAFSX   0x0d01

§ I2SCC32XXDMA_PIN_03_McACLK

#define I2SCC32XXDMA_PIN_03_McACLK   0x0302

§ I2SCC32XXDMA_PIN_15_McAFSX

#define I2SCC32XXDMA_PIN_15_McAFSX   0x070e

§ I2SCC32XXDMA_PIN_17_McAFSX

#define I2SCC32XXDMA_PIN_17_McAFSX   0x0610

§ I2SCC32XXDMA_PIN_21_McAFSX

#define I2SCC32XXDMA_PIN_21_McAFSX   0x0214

§ I2SCC32XXDMA_PIN_45_McAXR0

#define I2SCC32XXDMA_PIN_45_McAXR0   0x062c

§ I2SCC32XXDMA_PIN_45_McAFSX

#define I2SCC32XXDMA_PIN_45_McAFSX   0x0c2c

§ I2SCC32XXDMA_PIN_50_McAXR0

#define I2SCC32XXDMA_PIN_50_McAXR0   0x0431

§ I2SCC32XXDMA_PIN_50_McAXR1

#define I2SCC32XXDMA_PIN_50_McAXR1   0x0631

§ I2SCC32XXDMA_PIN_52_McACLK

#define I2SCC32XXDMA_PIN_52_McACLK   0x0233

§ I2SCC32XXDMA_PIN_52_McAXR0

#define I2SCC32XXDMA_PIN_52_McAXR0   0x0433

§ I2SCC32XXDMA_PIN_53_McACLK

#define I2SCC32XXDMA_PIN_53_McACLK   0x0234

§ I2SCC32XXDMA_PIN_53_McAFSX

#define I2SCC32XXDMA_PIN_53_McAFSX   0x0334

§ I2SCC32XXDMA_PIN_60_McAXR1

#define I2SCC32XXDMA_PIN_60_McAXR1   0x063b

§ I2SCC32XXDMA_PIN_62_McACLKX

#define I2SCC32XXDMA_PIN_62_McACLKX   0x0d3d

§ I2SCC32XXDMA_PIN_63_McAFSX

#define I2SCC32XXDMA_PIN_63_McAFSX   0x073e

§ I2SCC32XXDMA_PIN_64_McAXR0

#define I2SCC32XXDMA_PIN_64_McAXR0   0x073f

§ I2SCC32XXDMA_SET_ZEROBUF_LEN

#define I2SCC32XXDMA_SET_ZEROBUF_LEN   I2SCC32XXDMA_CMD_SET_ZEROBUF_LEN

§ I2SCC32XXDMA_SET_EMPTYBUF_LEN

#define I2SCC32XXDMA_SET_EMPTYBUF_LEN   I2SCC32XXDMA_CMD_SET_EMPTYBUF_LEN

§ I2SCC32XXDMA_INDEX_INVALID

#define I2SCC32XXDMA_INDEX_INVALID   0xFF

§ I2SCC32XXDMA_NUM_SERIAL_PINS

#define I2SCC32XXDMA_NUM_SERIAL_PINS   2

Typedef Documentation

§ I2SCC32XXDMA_DataSize

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

I2SCC32XXDMA_16bit: txBuf and rxBuf are arrays of uint16_t elements I2SCC32XXDMA_32bit: txBuf and rxBuf are arrays of uint32_t elements

§ I2SCC32XXDMA_HWAttrsV1

I2SCC32XXDMA Hardware attributes.

These fields, with the exception of intPriority, are used by driverlib APIs and therefore must be populated by driverlib macro definitions. For CC32XXWare 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.dpl 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:

const I2SCC32XXDMA_HWAttrsV1 i2sCC32XXHWAttrs[] = {
{
.baseAddr = I2S_BASE,
.intNum = INT_I2S,
.intPriority = (~0),
.rxChannelIndex = UDMA_CH4_I2S_RX,
.txChannelIndex = UDMA_CH5_I2S_TX,
}
};

§ I2SCC32XXDMA_SerialPinConfig

CC32XX Serial Pin Configuration.

§ I2SCC32XXDMA_SerialPinParams

CC32XX specific I2S Parameters.

§ I2SCC32XXDMA_SerialPinVars

I2SCC32XXDMA Serial pin variables.

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

§ I2SCC32XXDMA_Object

I2SCC32XXDMA Object.

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

§ I2SCC32XXDMA_Handle

Enumeration Type Documentation

§ I2SCC32XXDMA_DataSize

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

I2SCC32XXDMA_16bit: txBuf and rxBuf are arrays of uint16_t elements I2SCC32XXDMA_32bit: txBuf and rxBuf are arrays of uint32_t elements

Enumerator
I2SCC32XXDMA_16bit 
I2SCC32XXDMA_32bit 

Function Documentation

§ I2SCC32XXDMA_Params_init()

void I2SCC32XXDMA_Params_init ( I2SCC32XXDMA_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

§ I2SCC32XXDMA_fxnTable

const I2S_FxnTable I2SCC32XXDMA_fxnTable
Copyright 2017, Texas Instruments Incorporated