+ Collaboration diagram for Functions:

Functions

uint16_t app_i2s_init (app_i2s_params_t *p_params, app_i2s_evt_handler_t evt_handler)
 Initialize the APP I2S DRIVER according to the specified parameters in the app_i2s_params_t and app_i2s_evt_handler_t. More...
 
uint16_t app_i2s_deinit (app_i2s_id_t id)
 De-initialize the APP I2S DRIVER peripheral. More...
 
uint16_t app_i2s_receive_sync (app_i2s_id_t id, uint16_t *p_data, uint16_t size, uint32_t timeout)
 Receive in master or slave mode an amount of data in blocking mode. More...
 
uint16_t app_i2s_receive_async (app_i2s_id_t id, uint16_t *p_data, uint16_t size)
 Receive in master or slave mode an amount of data in non-blocking mode with Interrupt. More...
 
uint16_t app_i2s_transmit_sync (app_i2s_id_t id, uint16_t *p_data, uint16_t size, uint32_t timeout)
 Transmits in master or slave mode an amount of data in blocking mode. More...
 
uint16_t app_i2s_transmit_async (app_i2s_id_t id, uint16_t *p_data, uint16_t size)
 Transmits in master or slave mode an amount of data in non-blocking mode with Interrupt. More...
 
uint16_t app_i2s_enable (app_i2s_id_t id)
 Enable the I2S moudle. More...
 
uint16_t app_i2s_disable (app_i2s_id_t id)
 Disable the I2S moudle. More...
 
uint16_t app_i2s_enable_clock (app_i2s_id_t id)
 Enable the master I2S clock. More...
 
uint16_t app_i2s_disable_clock (app_i2s_id_t id)
 Disable the master I2S clock. More...
 
uint16_t app_i2s_flush_tx_fifo (app_i2s_id_t id)
 Flush the I2S transmitter FIFO. More...
 
uint16_t app_i2s_flush_rx_fifo (app_i2s_id_t id)
 Flush the I2S receiver FIFO. More...
 
i2s_handle_tapp_i2s_get_handle (app_i2s_id_t id)
 Return the I2S handle. More...
 
uint16_t app_i2s_abort (app_i2s_id_t id)
 Abort ongoing transfer (blocking mode). More...
 
uint16_t app_i2s_transmit_receive_sync (app_i2s_id_t id, uint16_t *p_tx_data, uint16_t *p_rx_data, uint32_t length, uint32_t timeout)
 Transmit and Receive an amount of data in blocking mode. More...
 
uint16_t app_i2s_transmit_receive_async (app_i2s_id_t id, uint16_t *p_tx_data, uint16_t *p_rx_data, uint32_t length)
 Transmit and Receive an amount of data in non-blocking mode with Interrupt. More...
 
uint16_t app_i2s_dma_init (app_i2s_params_t *p_params)
 Initialize the APP I2S DRIVER according to the specified parameters in the app_i2s_params_t and app_i2s_evt_handler_t. More...
 
uint16_t app_i2s_dma_deinit (app_i2s_id_t id)
 De-initialize the APP I2S DRIVER peripheral. More...
 
uint16_t app_i2s_dma_receive_async (app_i2s_id_t id, uint16_t *p_data, uint16_t size)
 Receive in master or slave mode an amount of data in non-blocking mode with Interrupt. More...
 
uint16_t app_i2s_dma_transmit_async (app_i2s_id_t id, uint16_t *p_data, uint16_t size)
 Transmits in master or slave mode an amount of data in non-blocking mode with Interrupt. More...
 
uint16_t app_i2s_dma_transmit_receive_async (app_i2s_id_t id, uint16_t *p_tx_data, uint16_t *p_rx_data, uint32_t length)
 Transmit and Receive an amount of data in non-blocking mode with Interrupt. More...
 

Detailed Description

Function Documentation

◆ app_i2s_abort()

uint16_t app_i2s_abort ( app_i2s_id_t  id)

Abort ongoing transfer (blocking mode).

Parameters
idI2S ID
Note
This procedure is executed in blocking mode: When exiting function, Abort is considered as completed.
Return values
APP_DRV_SUCCESSOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.
APP_DRV_ERR_INVALID_PARAMParameter error.

◆ app_i2s_deinit()

uint16_t app_i2s_deinit ( app_i2s_id_t  id)

De-initialize the APP I2S DRIVER peripheral.

Parameters
[in]idDe-initialize for a specific ID.
Returns
Result of De-initialization.

◆ app_i2s_disable()

uint16_t app_i2s_disable ( app_i2s_id_t  id)

Disable the I2S moudle.

Parameters
[in]idThe I2S module id.
Returns
Result of operation.

◆ app_i2s_disable_clock()

uint16_t app_i2s_disable_clock ( app_i2s_id_t  id)

Disable the master I2S clock.

Parameters
[in]idThe I2S master module id.
Returns
Result of operation.

◆ app_i2s_dma_deinit()

uint16_t app_i2s_dma_deinit ( app_i2s_id_t  id)

De-initialize the APP I2S DRIVER peripheral.

Parameters
[in]idDe-initialize for a specific ID.
Returns
Result of De-initialization.

◆ app_i2s_dma_init()

uint16_t app_i2s_dma_init ( app_i2s_params_t p_params)

Initialize the APP I2S DRIVER according to the specified parameters in the app_i2s_params_t and app_i2s_evt_handler_t.

Note
If interrupt mode is set, you can use blocking mode. Conversely, if blocking mode is set, you can't use interrupt mode.
Parameters
[in]p_paramsPointer to app_i2s_params_t parameter which contains the configuration information for the specified I2S module.
Returns
Result of initialization.

◆ app_i2s_dma_receive_async()

uint16_t app_i2s_dma_receive_async ( app_i2s_id_t  id,
uint16_t *  p_data,
uint16_t  size 
)

Receive in master or slave mode an amount of data in non-blocking mode with Interrupt.

Parameters
[in]idwhich I2S module want to receive.
[in]p_dataPointer to data buffer
[in]sizeAmount of data to be sent
Returns
Result of operation.

◆ app_i2s_dma_transmit_async()

uint16_t app_i2s_dma_transmit_async ( app_i2s_id_t  id,
uint16_t *  p_data,
uint16_t  size 
)

Transmits in master or slave mode an amount of data in non-blocking mode with Interrupt.

Parameters
[in]idwhich I2S module want to transmit.
[in]p_dataPointer to data buffer
[in]sizeAmount of data to be sent
Returns
Result of operation.

◆ app_i2s_dma_transmit_receive_async()

uint16_t app_i2s_dma_transmit_receive_async ( app_i2s_id_t  id,
uint16_t *  p_tx_data,
uint16_t *  p_rx_data,
uint32_t  length 
)

Transmit and Receive an amount of data in non-blocking mode with Interrupt.

Parameters
[in]idI2S ID
[in]p_tx_dataPointer to transmission data buffer
[out]p_rx_dataPointer to reception data buffer
[in]lengthAmount of data to be sent and received in bytes
Return values
APP_DRV_SUCCESSOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.
APP_DRV_ERR_INVALID_PARAMParameter error.
APP_DRV_ERR_BUSYDriver is busy.

◆ app_i2s_enable()

uint16_t app_i2s_enable ( app_i2s_id_t  id)

Enable the I2S moudle.

Parameters
[in]idThe I2S module id.
Returns
Result of operation.

◆ app_i2s_enable_clock()

uint16_t app_i2s_enable_clock ( app_i2s_id_t  id)

Enable the master I2S clock.

Parameters
[in]idThe I2S master module id.
Returns
Result of operation.

◆ app_i2s_flush_rx_fifo()

uint16_t app_i2s_flush_rx_fifo ( app_i2s_id_t  id)

Flush the I2S receiver FIFO.

Parameters
[in]idwhich I2S module want to flush.
Returns
Result of operation.

◆ app_i2s_flush_tx_fifo()

uint16_t app_i2s_flush_tx_fifo ( app_i2s_id_t  id)

Flush the I2S transmitter FIFO.

Parameters
[in]idwhich I2S module want to flush.
Returns
Result of operation.

◆ app_i2s_get_handle()

i2s_handle_t* app_i2s_get_handle ( app_i2s_id_t  id)

Return the I2S handle.

Parameters
[in]idI2S Channel ID.
Returns
Pointer to the specified ID's I2S handle.

◆ app_i2s_init()

uint16_t app_i2s_init ( app_i2s_params_t p_params,
app_i2s_evt_handler_t  evt_handler 
)

Initialize the APP I2S DRIVER according to the specified parameters in the app_i2s_params_t and app_i2s_evt_handler_t.

Note
If interrupt mode is set, you can use blocking mode. Conversely, if blocking mode is set, you can't use interrupt mode.
Parameters
[in]p_paramsPointer to app_i2s_params_t parameter which contains the configuration information for the specified I2S module.
[in]evt_handlerI2S user callback function.
Returns
Result of initialization.

◆ app_i2s_receive_async()

uint16_t app_i2s_receive_async ( app_i2s_id_t  id,
uint16_t *  p_data,
uint16_t  size 
)

Receive in master or slave mode an amount of data in non-blocking mode with Interrupt.

Parameters
[in]idwhich I2S module want to receive.
[in]p_dataPointer to data buffer
[in]sizeAmount of data to be sent
Returns
Result of operation.

◆ app_i2s_receive_sync()

uint16_t app_i2s_receive_sync ( app_i2s_id_t  id,
uint16_t *  p_data,
uint16_t  size,
uint32_t  timeout 
)

Receive in master or slave mode an amount of data in blocking mode.

Parameters
[in]idwhich I2S module want to receive.
[in]p_dataPointer to data buffer
[in]sizeAmount of data to be sent
[in]timeoutTimeout duration
Returns
Result of operation.

◆ app_i2s_transmit_async()

uint16_t app_i2s_transmit_async ( app_i2s_id_t  id,
uint16_t *  p_data,
uint16_t  size 
)

Transmits in master or slave mode an amount of data in non-blocking mode with Interrupt.

Parameters
[in]idwhich I2S module want to transmit.
[in]p_dataPointer to data buffer
[in]sizeAmount of data to be sent
Returns
Result of operation.

◆ app_i2s_transmit_receive_async()

uint16_t app_i2s_transmit_receive_async ( app_i2s_id_t  id,
uint16_t *  p_tx_data,
uint16_t *  p_rx_data,
uint32_t  length 
)

Transmit and Receive an amount of data in non-blocking mode with Interrupt.

Parameters
[in]idI2S ID
[in]p_tx_dataPointer to transmission data buffer
[out]p_rx_dataPointer to reception data buffer
[in]lengthAmount of data to be sent and received in bytes
Return values
APP_DRV_SUCCESSOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.
APP_DRV_ERR_INVALID_PARAMParameter error.
APP_DRV_ERR_BUSYDriver is busy.

◆ app_i2s_transmit_receive_sync()

uint16_t app_i2s_transmit_receive_sync ( app_i2s_id_t  id,
uint16_t *  p_tx_data,
uint16_t *  p_rx_data,
uint32_t  length,
uint32_t  timeout 
)

Transmit and Receive an amount of data in blocking mode.

Parameters
idI2S ID
p_tx_dataPointer to transmission data buffer
[out]p_rx_dataPointer to reception data buffer
[in]lengthAmount of data to be sent and received in bytes
[in]timeoutTimeout duration
Return values
APP_DRV_SUCCESSOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.
APP_DRV_ERR_INVALID_PARAMParameter error.
APP_DRV_ERR_BUSYDriver is busy.

◆ app_i2s_transmit_sync()

uint16_t app_i2s_transmit_sync ( app_i2s_id_t  id,
uint16_t *  p_data,
uint16_t  size,
uint32_t  timeout 
)

Transmits in master or slave mode an amount of data in blocking mode.

Parameters
[in]idwhich I2S module want to transmit.
[in]p_dataPointer to data buffer
[in]sizeAmount of data to be sent
[in]timeoutTimeout duration
Returns
Result of operation.