![]() |
NANO100_BSP V3.04.002
The Board Support Package for Nano100BN Series
|
Nano100 series I2S driver header file. More...
Go to the source code of this file.
Macros | |
#define | I2S_DATABIT_8 (0 << I2S_CTRL_WORDWIDTH_Pos) |
#define | I2S_DATABIT_16 (1 << I2S_CTRL_WORDWIDTH_Pos) |
#define | I2S_DATABIT_24 (2 << I2S_CTRL_WORDWIDTH_Pos) |
#define | I2S_DATABIT_32 (3 << I2S_CTRL_WORDWIDTH_Pos) |
#define | I2S_MONO I2S_CTRL_MONO_Msk |
#define | I2S_STEREO 0 |
#define | I2S_FORMAT_MSB I2S_CTRL_FORMAT_Msk |
#define | I2S_FORMAT_I2S 0 |
#define | I2S_I2S 0 |
#define | I2S_MODE_SLAVE I2S_CTRL_SLAVE_Msk |
#define | I2S_MODE_MASTER 0 |
#define | I2S_FIFO_TX_LEVEL_WORD_0 0 |
#define | I2S_FIFO_TX_LEVEL_WORD_1 (1 << I2S_CTRL_TXTH_Pos) |
#define | I2S_FIFO_TX_LEVEL_WORD_2 (2 << I2S_CTRL_TXTH_Pos) |
#define | I2S_FIFO_TX_LEVEL_WORD_3 (3 << I2S_CTRL_TXTH_Pos) |
#define | I2S_FIFO_TX_LEVEL_WORD_4 (4 << I2S_CTRL_TXTH_Pos) |
#define | I2S_FIFO_TX_LEVEL_WORD_5 (5 << I2S_CTRL_TXTH_Pos) |
#define | I2S_FIFO_TX_LEVEL_WORD_6 (6 << I2S_CTRL_TXTH_Pos) |
#define | I2S_FIFO_TX_LEVEL_WORD_7 (7 << I2S_CTRL_TXTH_Pos) |
#define | I2S_FIFO_RX_LEVEL_WORD_1 0 |
#define | I2S_FIFO_RX_LEVEL_WORD_2 (1 << I2S_CTRL_RXTH_Pos) |
#define | I2S_FIFO_RX_LEVEL_WORD_3 (2 << I2S_CTRL_RXTH_Pos) |
#define | I2S_FIFO_RX_LEVEL_WORD_4 (3 << I2S_CTRL_RXTH_Pos) |
#define | I2S_FIFO_RX_LEVEL_WORD_5 (4 << I2S_CTRL_RXTH_Pos) |
#define | I2S_FIFO_RX_LEVEL_WORD_6 (5 << I2S_CTRL_RXTH_Pos) |
#define | I2S_FIFO_RX_LEVEL_WORD_7 (6 << I2S_CTRL_RXTH_Pos) |
#define | I2S_FIFO_RX_LEVEL_WORD_8 (7 << I2S_CTRL_RXTH_Pos) |
#define | I2S_MONO_RIGHT 0 |
#define | I2S_MONO_LEFT I2S_CTRL_RXLCH_Msk |
#define | I2S_RIGHT 0 |
#define | I2S_LEFT 1 |
#define | I2S_ENABLE_TXDMA(i2s) |
Enable I2S Tx DMA function. I2S requests DMA to transfer data to Tx FIFO. More... | |
#define | I2S_DISABLE_TXDMA(i2s) |
Disable I2S Tx DMA function. I2S requests DMA to transfer data to Tx FIFO. More... | |
#define | I2S_ENABLE_RXDMA(i2s) |
Enable I2S Rx DMA function. I2S requests DMA to transfer data from Rx FIFO. More... | |
#define | I2S_DISABLE_RXDMA(i2s) |
Disable I2S Rx DMA function. I2S requests DMA to transfer data from Rx FIFO. More... | |
#define | I2S_ENABLE_TX(i2s) |
Enable I2S Tx function . More... | |
#define | I2S_DISABLE_TX(i2s) |
Disable I2S Tx function . More... | |
#define | I2S_ENABLE_RX(i2s) |
Enable I2S Rx function . More... | |
#define | I2S_DISABLE_RX(i2s) |
Disable I2S Rx function . More... | |
#define | I2S_ENABLE_TX_MUTE(i2s) |
Enable Tx Mute function . More... | |
#define | I2S_DISABLE_TX_MUTE(i2s) |
Disable Tx Mute function . More... | |
#define | I2S_CLR_TX_FIFO(i2s) |
Clear Tx FIFO. Internal pointer is reset to FIFO start point. More... | |
#define | I2S_CLR_RX_FIFO(i2s) |
Clear Rx FIFO. Internal pointer is reset to FIFO start point. More... | |
#define | I2S_SET_MONO_RX_CHANNEL(i2s, u32Ch) |
This function sets the recording source channel when mono mode is used. More... | |
#define | I2S_WRITE_TX_FIFO(i2s, u32Data) |
Write data to I2S Tx FIFO. More... | |
#define | I2S_READ_RX_FIFO(i2s) |
Read Rx FIFO. More... | |
#define | I2S_GET_INT_FLAG(i2s, u32Mask) |
This function gets the interrupt flag according to the mask parameter. More... | |
#define | I2S_CLR_INT_FLAG(i2s, u32Mask) |
This function clears the interrupt flag according to the mask parameter. More... | |
#define | I2S_GET_TX_FIFO_LEVEL(i2s) |
Get transmit FIFO level. More... | |
#define | I2S_GET_RX_FIFO_LEVEL(i2s) |
Get receive FIFO level. More... | |
Functions | |
static __INLINE void | I2S_ENABLE_TX_ZCD (I2S_T *i2s, uint32_t u32ChMask) |
Enable zero cross detect function. More... | |
static __INLINE void | I2S_DISABLE_TX_ZCD (I2S_T *i2s, uint32_t u32ChMask) |
Disable zero cross detect function. More... | |
uint32_t | I2S_Open (I2S_T *i2s, uint32_t u32MasterSlave, uint32_t u32SampleRate, uint32_t u32WordWidth, uint32_t u32Channels, uint32_t u32DataFormat, uint32_t u32AudioInterface) |
This function configures some parameters of I2S interface for general purpose use. The sample rate may not be used from the parameter, it depends on system's clock settings, but real sample rate used by system will be returned for reference. More... | |
void | I2S_Close (I2S_T *i2s) |
Disable I2S function and I2S clock. More... | |
void | I2S_EnableInt (I2S_T *i2s, uint32_t u32Mask) |
This function enables the interrupt according to the mask parameter. More... | |
void | I2S_DisableInt (I2S_T *i2s, uint32_t u32Mask) |
This function disables the interrupt according to the mask parameter. More... | |
uint32_t | I2S_EnableMCLK (I2S_T *i2s, uint32_t u32BusClock) |
Enable MCLK . More... | |
void | I2S_DisableMCLK (I2S_T *i2s) |
Disable MCLK . More... | |
void | I2S_SetFIFO (I2S_T *i2s, uint32_t u32TxThreshold, uint32_t u32RxThreshold) |
Configure FIFO threshold setting. More... | |
Nano100 series I2S driver header file.
Definition in file i2s.h.