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... | |
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_Object * | I2SCC32XXDMA_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 |
#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_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 |
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.
I2SCC32XXDMA_16bit: txBuf and rxBuf are arrays of uint16_t elements I2SCC32XXDMA_32bit: txBuf and rxBuf are arrays of uint32_t elements
typedef struct I2SCC32XXDMA_HWAttrsV1 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:
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:
typedef struct I2SCC32XXDMA_SerialPinConfig I2SCC32XXDMA_SerialPinConfig |
CC32XX Serial Pin Configuration.
typedef struct I2SCC32XXDMA_SerialPinParams I2SCC32XXDMA_SerialPinParams |
CC32XX specific I2S Parameters.
typedef struct I2SCC32XXDMA_SerialPinVars I2SCC32XXDMA_SerialPinVars |
I2SCC32XXDMA Serial pin variables.
The application must not access any member variables of this structure!
typedef struct I2SCC32XXDMA_Object I2SCC32XXDMA_Object |
I2SCC32XXDMA Object.
The application must not access any member variables of this structure!
typedef struct I2SCC32XXDMA_Object * I2SCC32XXDMA_Handle |
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 |
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;
params | Parameter structure to initialize |
const I2S_FxnTable I2SCC32XXDMA_fxnTable |