STM32H735xx HAL User Manual
Functions
IO operation functions
I2S Exported Functions

Data transfers functions. More...

Functions

HAL_StatusTypeDef HAL_I2S_Transmit (I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size, uint32_t Timeout)
 Transmit an amount of data in blocking mode.
HAL_StatusTypeDef HAL_I2S_Receive (I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size, uint32_t Timeout)
 Receive an amount of data in blocking mode.
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_I2S_Transmit_IT (I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size)
 Transmit an amount of data in non-blocking mode with Interrupt.
HAL_StatusTypeDef HAL_I2S_Receive_IT (I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size)
 Receive an amount of data in non-blocking mode with Interrupt.
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_I2S_Transmit_DMA (I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size)
 Transmit an amount of data in non-blocking mode with DMA.
HAL_StatusTypeDef HAL_I2S_Receive_DMA (I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size)
 Receive an amount of data in non-blocking mode with DMA.
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.
HAL_StatusTypeDef HAL_I2S_DMAPause (I2S_HandleTypeDef *hi2s)
 Pauses the audio DMA Stream/Channel playing from the Media.
HAL_StatusTypeDef HAL_I2S_DMAResume (I2S_HandleTypeDef *hi2s)
 Resumes the audio DMA Stream/Channel playing from the Media.
HAL_StatusTypeDef HAL_I2S_DMAStop (I2S_HandleTypeDef *hi2s)
 Stops the audio DMA Stream/Channel playing from the Media.
void HAL_I2S_IRQHandler (I2S_HandleTypeDef *hi2s)
 This function handles I2S interrupt request.
__weak void HAL_I2S_TxHalfCpltCallback (I2S_HandleTypeDef *hi2s)
 Tx Transfer Half completed callbacks.
__weak void HAL_I2S_TxCpltCallback (I2S_HandleTypeDef *hi2s)
 Tx Transfer completed callbacks.
__weak void HAL_I2S_RxHalfCpltCallback (I2S_HandleTypeDef *hi2s)
 Rx Transfer half completed callbacks.
__weak void HAL_I2S_RxCpltCallback (I2S_HandleTypeDef *hi2s)
 Rx Transfer completed callbacks.
__weak void HAL_I2SEx_TxRxHalfCpltCallback (I2S_HandleTypeDef *hi2s)
 Rx Transfer half completed callbacks.
__weak void HAL_I2SEx_TxRxCpltCallback (I2S_HandleTypeDef *hi2s)
 Rx Transfer completed callbacks.
__weak void HAL_I2S_ErrorCallback (I2S_HandleTypeDef *hi2s)
 I2S error callbacks.

Detailed Description

Data transfers 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_I2S_Transmit()
        (++) HAL_I2S_Receive()
        (++) HAL_I2SEx_TransmitReceive()

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

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

    (#) A set of Transfer Complete Callbacks are provided in non Blocking mode:
        (++) HAL_I2S_TxCpltCallback()
        (++) HAL_I2S_RxCpltCallback()
        (++) HAL_I2SEx_TxRxCpltCallback()
        (++) HAL_I2S_ErrorCallback()


Function Documentation

HAL_StatusTypeDef HAL_I2S_DMAPause ( I2S_HandleTypeDef hi2s)

Pauses the audio DMA Stream/Channel playing from the Media.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values:
HALstatus

Definition at line 1679 of file stm32h7xx_hal_i2s.c.

References __HAL_I2S_DISABLE, __I2S_HandleTypeDef::ErrorCode, HAL_GetTick(), HAL_I2S_ERROR_NO_OGT, HAL_I2S_ERROR_NOT_SUPPORTED, HAL_I2S_ERROR_TIMEOUT, HAL_I2S_STATE_READY, I2S_TIMEOUT, __I2S_HandleTypeDef::Init, __I2S_HandleTypeDef::Instance, IS_I2S_MASTER, I2S_InitTypeDef::Mode, and __I2S_HandleTypeDef::State.

HAL_StatusTypeDef HAL_I2S_DMAResume ( I2S_HandleTypeDef hi2s)

Resumes the audio DMA Stream/Channel playing from the Media.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values:
HALstatus

Definition at line 1751 of file stm32h7xx_hal_i2s.c.

References __HAL_I2S_ENABLE, __I2S_HandleTypeDef::ErrorCode, HAL_I2S_ERROR_NONE, HAL_I2S_STATE_BUSY, HAL_I2S_STATE_READY, __I2S_HandleTypeDef::Instance, and __I2S_HandleTypeDef::State.

HAL_StatusTypeDef HAL_I2S_DMAStop ( I2S_HandleTypeDef hi2s)

Stops the audio DMA Stream/Channel playing from the Media.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values:
HALstatus

Definition at line 1786 of file stm32h7xx_hal_i2s.c.

References __HAL_I2S_DISABLE, __I2S_HandleTypeDef::ErrorCode, HAL_DMA_Abort(), HAL_I2S_ERROR_DMA, HAL_I2S_STATE_READY, __I2S_HandleTypeDef::hdmarx, __I2S_HandleTypeDef::hdmatx, __I2S_HandleTypeDef::Instance, and __I2S_HandleTypeDef::State.

I2S error callbacks.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values:
None

Definition at line 2072 of file stm32h7xx_hal_i2s.c.

Referenced by HAL_I2S_Init(), HAL_I2S_IRQHandler(), HAL_I2S_UnRegisterCallback(), and I2S_DMAError().

HAL_StatusTypeDef HAL_I2S_Receive ( I2S_HandleTypeDef hi2s,
uint16_t *  pData,
uint16_t  Size,
uint32_t  Timeout 
)

Receive an amount of data in blocking mode.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
pDataa 16-bit pointer to 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).
In I2S Master Receiver mode, just after enabling the peripheral the clock will be generate in continuous way and as the I2S is not disabled at the end of the I2S transaction.
Return values:
HALstatus

Definition at line 923 of file stm32h7xx_hal_i2s.c.

References __HAL_I2S_CLEAR_OVRFLAG, __HAL_I2S_ENABLE, __HAL_I2S_GET_FLAG, I2S_InitTypeDef::DataFormat, __I2S_HandleTypeDef::ErrorCode, HAL_I2S_ERROR_NONE, HAL_I2S_ERROR_OVR, HAL_I2S_ERROR_TIMEOUT, HAL_I2S_STATE_BUSY_RX, HAL_I2S_STATE_READY, I2S_DATAFORMAT_24B, I2S_DATAFORMAT_32B, I2S_FLAG_OVR, I2S_FLAG_RXP, I2S_WaitFlagStateUntilTimeout(), __I2S_HandleTypeDef::Init, __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.

HAL_StatusTypeDef HAL_I2S_Receive_DMA ( I2S_HandleTypeDef hi2s,
uint16_t *  pData,
uint16_t  Size 
)

Receive an amount of data in non-blocking mode with DMA.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
pDataa 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 1492 of file stm32h7xx_hal_i2s.c.

References __HAL_I2S_ENABLE, __I2S_HandleTypeDef::ErrorCode, HAL_DMA_Start_IT(), HAL_I2S_ERROR_DMA, HAL_I2S_ERROR_NONE, HAL_I2S_STATE_BUSY_RX, HAL_I2S_STATE_READY, __I2S_HandleTypeDef::hdmarx, I2S_DMAError(), I2S_DMARxCplt(), I2S_DMARxHalfCplt(), __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_I2S_Receive_IT ( I2S_HandleTypeDef hi2s,
uint16_t *  pData,
uint16_t  Size 
)

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

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
pDataa 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).
It is recommended to use DMA for the I2S receiver to avoid de-synchronization between Master and Slave otherwise the I2S interrupt should be optimized.
Return values:
HALstatus

Definition at line 1254 of file stm32h7xx_hal_i2s.c.

References __HAL_I2S_ENABLE, __HAL_I2S_ENABLE_IT, I2S_InitTypeDef::DataFormat, __I2S_HandleTypeDef::ErrorCode, HAL_I2S_ERROR_NONE, HAL_I2S_STATE_BUSY_RX, HAL_I2S_STATE_READY, I2S_DATAFORMAT_24B, I2S_DATAFORMAT_32B, I2S_IT_FRE, I2S_IT_OVR, I2S_IT_RXP, I2S_MODE_SLAVE_RX, I2S_Receive_16Bit_IT(), I2S_Receive_32Bit_IT(), __I2S_HandleTypeDef::Init, __I2S_HandleTypeDef::Instance, I2S_InitTypeDef::Mode, __I2S_HandleTypeDef::pRxBuffPtr, __I2S_HandleTypeDef::pTxBuffPtr, __I2S_HandleTypeDef::RxISR, __I2S_HandleTypeDef::RxXferCount, __I2S_HandleTypeDef::RxXferSize, __I2S_HandleTypeDef::State, __I2S_HandleTypeDef::TxXferCount, and __I2S_HandleTypeDef::TxXferSize.

Rx Transfer completed callbacks.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values:
None

Definition at line 2024 of file stm32h7xx_hal_i2s.c.

Referenced by HAL_I2S_Init(), HAL_I2S_UnRegisterCallback(), I2S_DMARxCplt(), I2S_Receive_16Bit_IT(), and I2S_Receive_32Bit_IT().

Rx Transfer half completed callbacks.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values:
None

Definition at line 2008 of file stm32h7xx_hal_i2s.c.

Referenced by HAL_I2S_Init(), HAL_I2S_UnRegisterCallback(), and I2S_DMARxHalfCplt().

HAL_StatusTypeDef HAL_I2S_Transmit ( I2S_HandleTypeDef hi2s,
uint16_t *  pData,
uint16_t  Size,
uint32_t  Timeout 
)

Transmit an amount of data in blocking mode.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
pDataa 16-bit pointer to 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 806 of file stm32h7xx_hal_i2s.c.

References __HAL_I2S_CLEAR_UDRFLAG, __HAL_I2S_ENABLE, __HAL_I2S_GET_FLAG, I2S_InitTypeDef::DataFormat, __I2S_HandleTypeDef::ErrorCode, HAL_I2S_ERROR_NONE, HAL_I2S_ERROR_TIMEOUT, HAL_I2S_ERROR_UDR, HAL_I2S_STATE_BUSY_TX, HAL_I2S_STATE_READY, I2S_DATAFORMAT_24B, I2S_DATAFORMAT_32B, I2S_FLAG_TXP, I2S_FLAG_UDR, I2S_WaitFlagStateUntilTimeout(), __I2S_HandleTypeDef::Init, __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.

HAL_StatusTypeDef HAL_I2S_Transmit_DMA ( I2S_HandleTypeDef hi2s,
uint16_t *  pData,
uint16_t  Size 
)

Transmit an amount of data in non-blocking mode with DMA.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
pDataa 16-bit pointer to the Transmit 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 1406 of file stm32h7xx_hal_i2s.c.

References __HAL_I2S_ENABLE, __I2S_HandleTypeDef::ErrorCode, HAL_DMA_Start_IT(), HAL_I2S_ERROR_DMA, HAL_I2S_ERROR_NONE, HAL_I2S_STATE_BUSY_TX, HAL_I2S_STATE_READY, __I2S_HandleTypeDef::hdmatx, I2S_DMAError(), I2S_DMATxCplt(), I2S_DMATxHalfCplt(), __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_I2S_Transmit_IT ( I2S_HandleTypeDef hi2s,
uint16_t *  pData,
uint16_t  Size 
)

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

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
pDataa 16-bit pointer to 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 1178 of file stm32h7xx_hal_i2s.c.

References __HAL_I2S_ENABLE, __HAL_I2S_ENABLE_IT, I2S_InitTypeDef::DataFormat, __I2S_HandleTypeDef::ErrorCode, HAL_I2S_ERROR_NONE, HAL_I2S_STATE_BUSY_TX, HAL_I2S_STATE_READY, I2S_DATAFORMAT_24B, I2S_DATAFORMAT_32B, I2S_IT_FRE, I2S_IT_TXP, I2S_IT_UDR, I2S_MODE_SLAVE_TX, I2S_Transmit_16Bit_IT(), I2S_Transmit_32Bit_IT(), __I2S_HandleTypeDef::Init, __I2S_HandleTypeDef::Instance, I2S_InitTypeDef::Mode, __I2S_HandleTypeDef::pRxBuffPtr, __I2S_HandleTypeDef::pTxBuffPtr, __I2S_HandleTypeDef::RxXferCount, __I2S_HandleTypeDef::RxXferSize, __I2S_HandleTypeDef::State, __I2S_HandleTypeDef::TxISR, __I2S_HandleTypeDef::TxXferCount, and __I2S_HandleTypeDef::TxXferSize.

Tx Transfer completed callbacks.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values:
None

Definition at line 1992 of file stm32h7xx_hal_i2s.c.

Referenced by HAL_I2S_Init(), HAL_I2S_UnRegisterCallback(), I2S_DMATxCplt(), I2S_Transmit_16Bit_IT(), and I2S_Transmit_32Bit_IT().

Tx Transfer Half completed callbacks.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values:
None

Definition at line 1976 of file stm32h7xx_hal_i2s.c.

Referenced by HAL_I2S_Init(), HAL_I2S_UnRegisterCallback(), and I2S_DMATxHalfCplt().

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 1029 of file stm32h7xx_hal_i2s.c.

References __HAL_I2S_CLEAR_OVRFLAG, __HAL_I2S_CLEAR_UDRFLAG, __HAL_I2S_ENABLE, __HAL_I2S_GET_FLAG, I2S_InitTypeDef::DataFormat, __I2S_HandleTypeDef::ErrorCode, HAL_GetTick(), HAL_I2S_ERROR_NONE, HAL_I2S_ERROR_OVR, HAL_I2S_ERROR_TIMEOUT, HAL_I2S_ERROR_UDR, HAL_I2S_STATE_BUSY_TX_RX, HAL_I2S_STATE_READY, I2S_DATAFORMAT_24B, I2S_DATAFORMAT_32B, I2S_FLAG_OVR, I2S_FLAG_RXP, I2S_FLAG_TXP, I2S_FLAG_UDR, __I2S_HandleTypeDef::Init, __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.

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 1579 of file stm32h7xx_hal_i2s.c.

References __HAL_I2S_ENABLE, __I2S_HandleTypeDef::ErrorCode, HAL_DMA_Start_IT(), HAL_I2S_ERROR_DMA, HAL_I2S_ERROR_NONE, HAL_I2S_STATE_BUSY_TX_RX, HAL_I2S_STATE_READY, __I2S_HandleTypeDef::hdmarx, __I2S_HandleTypeDef::hdmatx, I2S_DMAError(), I2SEx_DMATxRxCplt(), I2SEx_DMATxRxHalfCplt(), __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 1328 of file stm32h7xx_hal_i2s.c.

References __HAL_I2S_ENABLE, __HAL_I2S_ENABLE_IT, I2S_InitTypeDef::DataFormat, __I2S_HandleTypeDef::ErrorCode, HAL_I2S_ERROR_NONE, HAL_I2S_STATE_BUSY_TX_RX, HAL_I2S_STATE_READY, I2S_DATAFORMAT_24B, I2S_DATAFORMAT_32B, I2S_IT_DXP, I2S_IT_FRE, I2S_IT_OVR, I2S_IT_RXP, I2S_IT_TXP, I2S_IT_UDR, I2S_MODE_SLAVE_FULLDUPLEX, I2S_Receive_16Bit_IT(), I2S_Receive_32Bit_IT(), I2S_Transmit_16Bit_IT(), I2S_Transmit_32Bit_IT(), __I2S_HandleTypeDef::Init, __I2S_HandleTypeDef::Instance, I2S_InitTypeDef::Mode, __I2S_HandleTypeDef::pRxBuffPtr, __I2S_HandleTypeDef::pTxBuffPtr, __I2S_HandleTypeDef::RxISR, __I2S_HandleTypeDef::RxXferCount, __I2S_HandleTypeDef::RxXferSize, __I2S_HandleTypeDef::State, __I2S_HandleTypeDef::TxISR, __I2S_HandleTypeDef::TxXferCount, and __I2S_HandleTypeDef::TxXferSize.

Rx Transfer completed callbacks.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values:
None

Definition at line 2056 of file stm32h7xx_hal_i2s.c.

Referenced by HAL_I2S_Init(), HAL_I2S_UnRegisterCallback(), I2S_Receive_16Bit_IT(), I2S_Receive_32Bit_IT(), and I2SEx_DMATxRxCplt().

Rx Transfer half completed callbacks.

Parameters:
hi2spointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module
Return values:
None

Definition at line 2040 of file stm32h7xx_hal_i2s.c.

Referenced by HAL_I2S_Init(), HAL_I2S_UnRegisterCallback(), and I2SEx_DMATxRxHalfCplt().