TI-RTOS Drivers
tidrivers_cc32xx_2_16_01_13
|
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>
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_Object * | I2SCC3200DMA_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 |
unsigned short | I2SCC3200DMA_zeroBuffer [32] |
I2S_BufDesc | I2SCC3200DMA_zeroBufDesc |
unsigned char | I2SCC3200DMA_emptyBuffer [32] |
I2S_BufDesc | I2SCC3200DMA_emptyBufDesc |
#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 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.
I2SCC3200DMA_16bit: txBuf and rxBuf are arrays of uint16_t elements I2SCC3200DMA_32bit: txBuf and rxBuf are arrays of uint32_t elements
typedef struct I2SCC3200DMA_HWAttrs I2SCC3200DMA_HWAttrs |
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:
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:
typedef struct I2SCC3200DMA_SerialPinConfig I2SCC3200DMA_SerialPinConfig |
CC3200 Serial Pin Configuration.
typedef struct I2SCC3200DMA_SerialPinParams I2SCC3200DMA_SerialPinParams |
CC3200 specific I2S Parameters.
typedef struct I2SCC3200DMA_SerialPinVars I2SCC3200DMA_SerialPinVars |
I2SCC3200DMA Serial pin variables.
The application must not access any member variables of this structure!
typedef struct I2SCC3200DMA_Object I2SCC3200DMA_Object |
I2SCC3200DMA Object.
The application must not access any member variables of this structure!
typedef struct I2SCC3200DMA_Object * I2SCC3200DMA_Handle |
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 |
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;
params | Parameter structure to initialize |
const I2S_FxnTable I2SCC3200DMA_fxnTable |
unsigned short I2SCC3200DMA_zeroBuffer[32] |
I2S_BufDesc I2SCC3200DMA_zeroBufDesc |
unsigned char I2SCC3200DMA_emptyBuffer[32] |
I2S_BufDesc I2SCC3200DMA_emptyBufDesc |