Data transfers functions.
More...
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
void | HAL_I2S_IRQHandler (I2S_HandleTypeDef *hi2s) |
| This function handles I2S interrupt request. More...
|
|
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. More...
|
|
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. More...
|
|
HAL_StatusTypeDef | HAL_I2S_DMAPause (I2S_HandleTypeDef *hi2s) |
| Pauses the audio DMA Stream/Channel playing from the Media. More...
|
|
HAL_StatusTypeDef | HAL_I2S_DMAResume (I2S_HandleTypeDef *hi2s) |
| Resumes the audio DMA Stream/Channel playing from the Media. More...
|
|
HAL_StatusTypeDef | HAL_I2S_DMAStop (I2S_HandleTypeDef *hi2s) |
| Stops the audio DMA Stream/Channel playing from the Media. More...
|
|
void | HAL_I2S_TxHalfCpltCallback (I2S_HandleTypeDef *hi2s) |
| Tx Transfer Half completed callbacks. More...
|
|
void | HAL_I2S_TxCpltCallback (I2S_HandleTypeDef *hi2s) |
| Tx Transfer completed callbacks. More...
|
|
void | HAL_I2S_RxHalfCpltCallback (I2S_HandleTypeDef *hi2s) |
| Rx Transfer half completed callbacks. More...
|
|
void | HAL_I2S_RxCpltCallback (I2S_HandleTypeDef *hi2s) |
| Rx Transfer completed callbacks. More...
|
|
void | HAL_I2S_ErrorCallback (I2S_HandleTypeDef *hi2s) |
| I2S error callbacks. More...
|
|
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()
(#) No-Blocking mode functions with Interrupt are :
(++) HAL_I2S_Transmit_IT()
(++) HAL_I2S_Receive_IT()
(#) No-Blocking mode functions with DMA are :
(++) HAL_I2S_Transmit_DMA()
(++) HAL_I2S_Receive_DMA()
(#) A set of Transfer Complete Callbacks are provided in non Blocking mode:
(++) HAL_I2S_TxCpltCallback()
(++) HAL_I2S_RxCpltCallback()
(++) HAL_I2S_ErrorCallback()
◆ HAL_I2S_DMAPause()
Pauses the audio DMA Stream/Channel playing from the Media.
- Parameters
-
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
- Return values
-
Definition at line 1367 of file stm32f4xx_hal_i2s.c.
◆ HAL_I2S_DMAResume()
Resumes the audio DMA Stream/Channel playing from the Media.
- Parameters
-
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
- Return values
-
Definition at line 1407 of file stm32f4xx_hal_i2s.c.
◆ HAL_I2S_DMAStop()
Stops the audio DMA Stream/Channel playing from the Media.
- Parameters
-
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
- Return values
-
Definition at line 1461 of file stm32f4xx_hal_i2s.c.
◆ HAL_I2S_ErrorCallback()
I2S error callbacks.
- Parameters
-
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
- Return values
-
Definition at line 1735 of file stm32f4xx_hal_i2s.c.
◆ HAL_I2S_IRQHandler()
This function handles I2S interrupt request.
- Parameters
-
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
- Return values
-
Definition at line 1659 of file stm32f4xx_hal_i2s.c.
◆ HAL_I2S_Receive()
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
-
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
pData | a 16-bit pointer to data buffer. |
Size | number 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 24-bit or 32-bit data length.
- Parameters
-
- 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
-
Definition at line 960 of file stm32f4xx_hal_i2s.c.
◆ HAL_I2S_Receive_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.
- Parameters
-
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
pData | a 16-bit pointer to the Receive data buffer. |
Size | number 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 24-bit or 32-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
-
Definition at line 1278 of file stm32f4xx_hal_i2s.c.
◆ HAL_I2S_Receive_IT()
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
-
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
pData | a 16-bit pointer to the Receive data buffer. |
Size | number 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 24-bit or 32-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
-
Definition at line 1123 of file stm32f4xx_hal_i2s.c.
◆ HAL_I2S_RxCpltCallback()
Rx Transfer completed callbacks.
- Parameters
-
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
- Return values
-
Definition at line 1719 of file stm32f4xx_hal_i2s.c.
◆ HAL_I2S_RxHalfCpltCallback()
Rx Transfer half completed callbacks.
- Parameters
-
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
- Return values
-
Definition at line 1703 of file stm32f4xx_hal_i2s.c.
◆ HAL_I2S_Transmit()
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
-
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
pData | a 16-bit pointer to data buffer. |
Size | number 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 24-bit or 32-bit data length.
- Parameters
-
- 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
-
Definition at line 842 of file stm32f4xx_hal_i2s.c.
◆ HAL_I2S_Transmit_DMA()
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
-
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
pData | a 16-bit pointer to the Transmit data buffer. |
Size | number 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 24-bit or 32-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
-
Definition at line 1187 of file stm32f4xx_hal_i2s.c.
◆ HAL_I2S_Transmit_IT()
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
-
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
pData | a 16-bit pointer to data buffer. |
Size | number 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 24-bit or 32-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
-
Definition at line 1057 of file stm32f4xx_hal_i2s.c.
◆ HAL_I2S_TxCpltCallback()
Tx Transfer completed callbacks.
- Parameters
-
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
- Return values
-
Definition at line 1687 of file stm32f4xx_hal_i2s.c.
◆ HAL_I2S_TxHalfCpltCallback()
Tx Transfer Half completed callbacks.
- Parameters
-
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
- Return values
-
Definition at line 1671 of file stm32f4xx_hal_i2s.c.