- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Defines | Typedefs | Enumerations | Functions | Variables
csl_i2s.h File Reference

I2S functional layer API header file. More...

`#include "soc.h"`
`#include "csl_error.h"`
`#include "csl_types.h"`
`#include "csl_general.h"`

Go to the source code of this file.

## Data Structures
struct | CSL_I2sObj
| Object structure. More...
struct | I2S_Config
| Configuration structure. More...
## Defines
#define | CSL_I2S_SCRL_ENABLE_DISABLE (Uint16)0
#define | CSL_I2S_SCRL_ENABLE_ENABLE (Uint16)1
#define | CSL_I2S_SCRL_MONO_DISABLE (Uint16)0
#define | CSL_I2S_SCRL_MONO_ENABLE (Uint16)1
#define | CSL_I2S_SCRL_LOOPBACK_DISABLE (Uint16)0
#define | CSL_I2S_SCRL_LOOPBACK_ENABLE (Uint16)1
#define | CSL_I2S_SCRL_FSPOL_DISABLE (Uint16)0
#define | CSL_I2S_SCRL_FSPOL_ENABLE (Uint16)1
#define | CSL_I2S_SCRL_CLOCKPOL_DISABLE (Uint16)0
#define | CSL_I2S_SCRL_CLOCKPOL_ENABLE (Uint16)1
#define | CSL_I2S_SCRL_DATADELAY_DISABLE (Uint16)0
#define | CSL_I2S_SCRL_DATADELAY_ENABLE (Uint16)1
#define | CSL_I2S_SCRL_PACK_DISABLE (Uint16)0
#define | CSL_I2S_SCRL_PACK_ENABLE (Uint16)1
#define | CSL_I2S_SCRL_SIGNEXT_DISABLE (Uint16)0
#define | CSL_I2S_SCRL_SIGNEXT_ENABLE (Uint16)1
#define | CSL_I2S_SCRL_WORDLENGTH_DISABLE (Uint16)0
#define | CSL_I2S_SCRL_WORDLENGTH_ENABLE (Uint16)1
#define | CSL_I2S_SCRL_MODE_DISABLE (Uint16)0
#define | CSL_I2S_SCRL_MODE_ENABLE (Uint16)1
#define | CSL_I2S_SCRL_FORMAT_DISABLE (Uint16)0
#define | CSL_I2S_SCRL_FORMAT_ENABLE (Uint16)1
#define | CSL_I2S_ICMRL_XMIT0_DISABLE (Uint16)0
#define | CSL_I2S_ICMRL_XMIT0_ENABLE (Uint16)1
#define | CSL_I2S_ICMRL_XMIT1_DISABLE (Uint16)0
#define | CSL_I2S_ICMRL_XMIT1_ENABLE (Uint16)1
#define | CSL_I2S_ICMRL_RCV0_DISABLE (Uint16)0
#define | CSL_I2S_ICMRL_RCV0_ENABLE (Uint16)1
#define | CSL_I2S_ICMRL_RCV1_DISABLE (Uint16)0
#define | CSL_I2S_ICMRL_RCV1_ENABLE (Uint16)1
#define | CSL_I2S_ICMRL_FERR_DISABLE (Uint16)0
#define | CSL_I2S_ICMRL_FERR_ENABLE (Uint16)1
#define | CSL_I2S_ICMRL_O_U_DISABLE (Uint16)0
#define | CSL_I2S_ICMRL_O_U_ENABLE (Uint16)1
#define | CSL_I2S_LATENCY_2 (2)
#define | CSL_I2S_LATENCY_3 (3)
#define | CSL_I2S_LATENCY_5 (5)
#define | CSL_I2S_LATENCY_6 (6)
## Typedefs
typedef CSL_I2sObj * | CSL_I2sHandle
| Pointet to the handler.
## Enumerations
enum | I2S_Instance { I2S_INSTANCE0, I2S_INSTANCE1, I2S_INSTANCE2, I2S_INSTANCE3, I2S_INVALID }
| I2S Instance Number. More...
enum | I2S_ChanType { I2S_CHAN_MONO, I2S_CHAN_STEREO, I2S_CHAN_UNDEF }
| I2S Audio channel type. More...
enum | I2S_OpMode { I2S_POLLED, I2S_INTERRUPT, DMA_POLLED, DMA_INTERRUPT, I2S_OPMODE_OTHER }
| I2S Device mode of transmission. More...
enum | I2S_LoopbackType { I2S_LOOPBACK_DISABLE, I2S_LOOPBACK_ENABLE }
| I2S Loop back mode bit. More...
enum | I2S_SerialEna { I2S_SERIAL_DISABLE, I2S_SERIAL_ENABLE }
| Serial transmission mode. More...
enum | I2S_MonoType { I2S_STEREO_ENABLE, I2S_MONO_ENABLE }
| I2S transmission data type(Mono/Stereo) More...
enum | I2S_FsyncPol { I2S_FSPOL_LOW, I2S_FSPOL_HIGH }
| I2S FSYNC Bit Polarity. More...
enum | I2S_ClkPol { I2S_RISING_EDGE, I2S_FALLING_EDGE }
| I2S Clock Polarity. More...
enum | I2S_DataDelay { I2S_DATADELAY_ONEBIT, I2S_DATADELAY_TWOBIT }
| I2S Data transmission delay. More...
enum | I2S_DatapackType { I2S_DATAPACK_DISABLE, I2S_DATAPACK_ENABLE }
| I2S Data packing bit. More...
enum | I2S_SignextType { I2S_SIGNEXT_DISABLE, I2S_SIGNEXT_ENABLE }
| I2S Sign extension bit. More...
enum | I2S_WordLen { I2S_WORDLEN_8, I2S_WORDLEN_10, I2S_WORDLEN_12, I2S_WORDLEN_14, I2S_WORDLEN_16, I2S_WORDLEN_18, I2S_WORDLEN_20, I2S_WORDLEN_24, I2S_WORDLEN_32, I2S_WORDLEN_INVALID }
| I2S data word length. More...
enum | I2S_Mode { I2S_SLAVE, I2S_MASTER }
| I2S Device mode of operation. More...
enum | I2S_DataFormat { I2S_DATAFORMAT_LJUST, I2S_DATAFORMAT_DSP }
| I2S Data format. More...
enum | I2S_Fsdiv { I2S_FSDIV8, I2S_FSDIV16, I2S_FSDIV32, I2S_FSDIV64, I2S_FSDIV128, I2S_FSDIV256, I2S_FSDIV_RESERVE }
| Serializer frame sync divider. More...
enum | I2S_Clkdiv { I2S_CLKDIV2, I2S_CLKDIV4, I2S_CLKDIV8, I2S_CLKDIV16, I2S_CLKDIV32, I2S_CLKDIV64, I2S_CLKDIV128, I2S_CLKDIV256 }
| Serializer clock divider. More...
enum | I2S_FsErr { I2S_FSERROR_DISABLE, I2S_FSERROR_ENABLE }
| FSYNC Error. More...
enum | I2S_OuErr { I2S_OUERROR_DISABLE, I2S_OUERROR_ENABLE }
| Over or under run error. More...
## Functions
CSL_I2sHandle | I2S_open (I2S_Instance i2sInstNum, I2S_OpMode opMode, I2S_ChanType chType)
CSL_Status | I2S_setup (CSL_I2sHandle i2sHandle, I2S_Config *i2sHwConfig)
CSL_Status | I2S_close (CSL_I2sHandle i2sHandle)
CSL_Status | I2S_read (CSL_I2sHandle i2sHandle, Uint16 *readBuff, Uint16 buffLen)
CSL_Status | I2S_write (CSL_I2sHandle i2sHandle, Uint16 *writeBuff, Uint16 buffLen)
CSL_Status | I2S_reset (CSL_I2sHandle hI2S)
CSL_Status | I2S_transEnable (CSL_I2sHandle i2sHandle, Uint16 enableBit)
## Variables
static CSL_I2sObj | I2S_InstanceNum [4]

## Detailed Description

I2S functional layer API header file.

Path: \(CSLPATH)/inc