AN706-00040-2v0-E
63
7.2.4.7 I
2
S Driver API
Function
void I2S_Init (void)
Overview
Initializes I
2
S driver.
Sets MFS initial settings (CSIO settings) and DMAC initial settings.
Parameter None
Return
value
None
Function
STATUS I2S_Start (uint8 t audio sample rate)
Overview
Starts I
2
S operation.
Sets data for DMAC and activates CSIO.
Be sure to initialize by I2S_Init function before function is invoked.
Parameter Audio sample rate Sampling rate
AUDIO_SAMPLE_44100 44.1kHz
AUDIO_SAMPLE_48000 48kHz
Return
value
I2S_RET_OK
Successful
I2S_RET_ILLEGAL_ERROR
Not yet initialized, operating or stopped
Function
STATUS I2S_Stop (void)
Overview
Completes I
2
S operation.
Stops CSIO.
Parameter None
Return
value
I2S_RET_OK
Successful
I2S_RET_ILLEGAL_ERROR
Not yet initialized or stopped
Function
uint8_t I2S_Get_Status(void)
Overview
Acquires I
2
S operating status.
Parameter None
Return
value
I2S_STATUS_INIT
Initialization status (I
2
S can be started)
I2S_STATUS_START
Start (I
2
S operating) status
I2S_STATUS_STOP
Stop (I
2
S cannot be started) status