STM32F439xx HAL User Manual
Functions
I2S Extended IO operation functions
I2S Extended Exported Functions

I2SEx IO operation functions. More...

Functions

HAL_StatusTypeDef HAL_I2SEx_TransmitReceive (I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData, uint16_t Size, uint32_t Timeout)
 Full-Duplex Transmit/Receive data in blocking mode.
HAL_StatusTypeDef HAL_I2SEx_TransmitReceive_IT (I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData, uint16_t Size)
 Full-Duplex Transmit/Receive data in non-blocking mode using Interrupt.
HAL_StatusTypeDef HAL_I2SEx_TransmitReceive_DMA (I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData, uint16_t Size)
 Full-Duplex Transmit/Receive data in non-blocking mode using DMA.
void HAL_I2SEx_FullDuplex_IRQHandler (I2S_HandleTypeDef *hi2s)
 This function handles I2S/I2Sext interrupt requests in full-duplex mode.
__weak void HAL_I2SEx_TxRxHalfCpltCallback (I2S_HandleTypeDef *hi2s)
 Tx and Rx Transfer half completed callback.
__weak void HAL_I2SEx_TxRxCpltCallback (I2S_HandleTypeDef *hi2s)
 Tx and Rx Transfer completed callback.

Detailed Description

I2SEx IO operation functions.

 ===============================================================================
                       ##### IO operation functions#####
 ===============================================================================
    [..]
    This subsection provides a set of functions allowing to manage the I2S data
    transfers.

    (#) There are two modes of transfer:
       (++) Blocking mode : The communication is performed in the polling mode.
            The status of all data processing is returned by the same function
            after finishing transfer.
       (++) No-Blocking mode : The communication is performed using Interrupts
            or DMA. These functions return the status of the transfer startup.
            The end of the data processing will be indicated through the
            dedicated I2S IRQ when using Interrupt mode or the DMA IRQ when
            using DMA mode.

    (#) Blocking mode functions are :
        (++) HAL_I2SEx_TransmitReceive()

    (#) No-Blocking mode functions with Interrupt are :
        (++) HAL_I2SEx_TransmitReceive_IT()
        (++) HAL_I2SEx_FullDuplex_IRQHandler()

    (#) No-Blocking mode functions with DMA are :
        (++) HAL_I2SEx_TransmitReceive_DMA()

    (#) A set of Transfer Complete Callback are provided in non Blocking mode:
        (++) HAL_I2SEx_TxRxCpltCallback()

Function Documentation

HAL_StatusTypeDef HAL_I2SEx_TransmitReceive ( I2S_HandleTypeDef hi2s,
uint16_t *  pTxData,
uint16_t *  pRxData,
uint16_t  Size,
uint32_t  Timeout 
)

Full-Duplex Transmit/Receive data in blocking mode.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
pTxDataa 16-bit pointer to the Transmit data buffer.
pRxDataa 16-bit pointer to the Receive data buffer.
Sizenumber of data sample to be sent:
Note:
When a 16-bit data frame or a 16-bit data frame extended is selected during the I2S configuration phase, the Size parameter means the number of 16-bit data length in the transaction and when a 24-bit data frame or a 32-bit data frame is selected the Size parameter means the number of 16-bit data length.
Parameters:
TimeoutTimeout duration
Note:
The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization between Master and Slave(example: audio streaming).
Return values:
HALstatus

Definition at line 215 of file stm32f4xx_hal_i2s_ex.c.

References __HAL_I2S_CLEAR_OVRFLAG, __HAL_I2S_CLEAR_UDRFLAG, __HAL_I2S_ENABLE, __HAL_I2S_GET_FLAG, __HAL_I2SEXT_CLEAR_OVRFLAG, __HAL_I2SEXT_ENABLE, __HAL_I2SEXT_GET_FLAG, __I2S_HandleTypeDef::ErrorCode, HAL_I2S_ERROR_NONE, HAL_I2S_ERROR_OVR, HAL_I2S_ERROR_TIMEOUT, HAL_I2S_ERROR_UDR, HAL_I2S_ErrorCallback(), HAL_I2S_STATE_BUSY_TX_RX, HAL_I2S_STATE_READY, I2S_DATAFORMAT_24B, I2S_DATAFORMAT_32B, I2S_FLAG_OVR, I2S_FLAG_RXNE, I2S_FLAG_TXE, I2S_FLAG_UDR, I2S_MODE_MASTER_RX, I2S_MODE_MASTER_TX, I2S_MODE_SLAVE_RX, I2S_MODE_SLAVE_TX, I2S_USE_I2S, I2S_USE_I2SEXT, I2SEx_FullDuplexWaitFlagStateUntilTimeout(), I2SxEXT, __I2S_HandleTypeDef::Instance, __I2S_HandleTypeDef::RxXferCount, __I2S_HandleTypeDef::RxXferSize, __I2S_HandleTypeDef::State, __I2S_HandleTypeDef::TxXferCount, and __I2S_HandleTypeDef::TxXferSize.

HAL_StatusTypeDef HAL_I2SEx_TransmitReceive_DMA ( I2S_HandleTypeDef hi2s,
uint16_t *  pTxData,
uint16_t *  pRxData,
uint16_t  Size 
)

Full-Duplex Transmit/Receive data in non-blocking mode using DMA.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
pTxDataa 16-bit pointer to the Transmit data buffer.
pRxDataa 16-bit pointer to the Receive data buffer.
Sizenumber of data sample to be sent:
Note:
When a 16-bit data frame or a 16-bit data frame extended is selected during the I2S configuration phase, the Size parameter means the number of 16-bit data length in the transaction and when a 24-bit data frame or a 32-bit data frame is selected the Size parameter means the number of 16-bit data length.
The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization between Master and Slave(example: audio streaming).
Return values:
HALstatus

Definition at line 625 of file stm32f4xx_hal_i2s_ex.c.

References __HAL_I2S_CLEAR_OVRFLAG, __HAL_I2S_ENABLE, __HAL_I2SEXT_ENABLE, __I2S_HandleTypeDef::ErrorCode, HAL_DMA_Start_IT(), HAL_I2S_ERROR_NONE, HAL_I2S_STATE_BUSY_TX_RX, HAL_I2S_STATE_READY, __I2S_HandleTypeDef::hdmarx, __I2S_HandleTypeDef::hdmatx, I2S_DATAFORMAT_24B, I2S_DATAFORMAT_32B, I2S_MODE_MASTER_RX, I2S_MODE_MASTER_TX, I2S_MODE_SLAVE_TX, I2SEx_TxRxDMACplt(), I2SEx_TxRxDMAError(), I2SEx_TxRxDMAHalfCplt(), I2SxEXT, __I2S_HandleTypeDef::Instance, __I2S_HandleTypeDef::pRxBuffPtr, __I2S_HandleTypeDef::pTxBuffPtr, __I2S_HandleTypeDef::RxXferCount, __I2S_HandleTypeDef::RxXferSize, __I2S_HandleTypeDef::State, __I2S_HandleTypeDef::TxXferCount, __I2S_HandleTypeDef::TxXferSize, __DMA_HandleTypeDef::XferCpltCallback, __DMA_HandleTypeDef::XferErrorCallback, and __DMA_HandleTypeDef::XferHalfCpltCallback.

HAL_StatusTypeDef HAL_I2SEx_TransmitReceive_IT ( I2S_HandleTypeDef hi2s,
uint16_t *  pTxData,
uint16_t *  pRxData,
uint16_t  Size 
)

Full-Duplex Transmit/Receive data in non-blocking mode using Interrupt.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
pTxDataa 16-bit pointer to the Transmit data buffer.
pRxDataa 16-bit pointer to the Receive data buffer.
Sizenumber of data sample to be sent:
Note:
When a 16-bit data frame or a 16-bit data frame extended is selected during the I2S configuration phase, the Size parameter means the number of 16-bit data length in the transaction and when a 24-bit data frame or a 32-bit data frame is selected the Size parameter means the number of 16-bit data length.
The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization between Master and Slave(example: audio streaming).
Return values:
HALstatus

Definition at line 469 of file stm32f4xx_hal_i2s_ex.c.

References __HAL_I2S_DISABLE_IT, __HAL_I2S_ENABLE, __HAL_I2S_ENABLE_IT, __HAL_I2SEXT_DISABLE_IT, __HAL_I2SEXT_ENABLE, __HAL_I2SEXT_ENABLE_IT, __I2S_HandleTypeDef::ErrorCode, HAL_I2S_ERROR_NONE, HAL_I2S_STATE_BUSY_TX_RX, HAL_I2S_STATE_READY, HAL_I2SEx_TxRxCpltCallback(), I2S_DATAFORMAT_24B, I2S_DATAFORMAT_32B, I2S_IT_ERR, I2S_IT_RXNE, I2S_IT_TXE, I2S_MODE_MASTER_RX, I2S_MODE_MASTER_TX, I2S_MODE_SLAVE_TX, I2SxEXT, __I2S_HandleTypeDef::Instance, __I2S_HandleTypeDef::pRxBuffPtr, __I2S_HandleTypeDef::pTxBuffPtr, __I2S_HandleTypeDef::RxXferCount, __I2S_HandleTypeDef::RxXferSize, __I2S_HandleTypeDef::State, __I2S_HandleTypeDef::TxXferCount, and __I2S_HandleTypeDef::TxXferSize.

Tx and Rx Transfer completed callback.

Parameters:
hi2sI2S handle
Return values:
None

Definition at line 902 of file stm32f4xx_hal_i2s_ex.c.

Referenced by HAL_I2SEx_TransmitReceive_IT(), I2SEx_FullDuplexRx_IT(), I2SEx_FullDuplexTx_IT(), and I2SEx_TxRxDMACplt().

Tx and Rx Transfer half completed callback.

Parameters:
hi2sI2S handle
Return values:
None

Definition at line 887 of file stm32f4xx_hal_i2s_ex.c.

Referenced by I2SEx_TxRxDMAHalfCplt().