STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
|
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_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. | |
void | HAL_I2S_IRQHandler (I2S_HandleTypeDef *hi2s) |
This function handles I2S interrupt request. | |
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_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_TxHalfCpltCallback (I2S_HandleTypeDef *hi2s) |
Tx Transfer Half completed callbacks. | |
void | HAL_I2S_TxCpltCallback (I2S_HandleTypeDef *hi2s) |
Tx Transfer completed callbacks. | |
void | HAL_I2S_RxHalfCpltCallback (I2S_HandleTypeDef *hi2s) |
Rx Transfer half completed callbacks. | |
void | HAL_I2S_RxCpltCallback (I2S_HandleTypeDef *hi2s) |
Rx Transfer completed callbacks. | |
void | HAL_I2S_ErrorCallback (I2S_HandleTypeDef *hi2s) |
I2S error callbacks. | |
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_StatusTypeDef HAL_I2S_Transmit | ( | I2S_HandleTypeDef * | hi2s, |
uint16_t * | pData, | ||
uint16_t | Size, | ||
uint32_t | Timeout ) |
#include <stm32f4xx_hal_i2s.h>
Transmit an amount of data in blocking mode.
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: |
Timeout | Timeout duration |
HAL | status |
Definition at line 842 of file stm32f4xx_hal_i2s.c.
References __HAL_I2S_CLEAR_UDRFLAG, __HAL_I2S_ENABLE, __HAL_I2S_GET_FLAG, __HAL_LOCK, __HAL_UNLOCK, __I2S_HandleTypeDef::ErrorCode, HAL_BUSY, HAL_ERROR, HAL_I2S_ERROR_NONE, HAL_I2S_ERROR_TIMEOUT, HAL_I2S_ERROR_UDR, HAL_I2S_STATE_BUSY_TX, HAL_I2S_STATE_READY, HAL_OK, I2S_DATAFORMAT_24B, I2S_DATAFORMAT_32B, I2S_FLAG_BSY, I2S_FLAG_TXE, I2S_FLAG_UDR, I2S_MODE_SLAVE_RX, I2S_MODE_SLAVE_TX, I2S_WaitFlagStateUntilTimeout(), __I2S_HandleTypeDef::Instance, __I2S_HandleTypeDef::pTxBuffPtr, __I2S_HandleTypeDef::State, __I2S_HandleTypeDef::TxXferCount, and __I2S_HandleTypeDef::TxXferSize.
HAL_StatusTypeDef HAL_I2S_Receive | ( | I2S_HandleTypeDef * | hi2s, |
uint16_t * | pData, | ||
uint16_t | Size, | ||
uint32_t | Timeout ) |
#include <stm32f4xx_hal_i2s.h>
Receive an amount of data in blocking mode.
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: |
Timeout | Timeout duration |
HAL | status |
Definition at line 960 of file stm32f4xx_hal_i2s.c.
References __HAL_I2S_CLEAR_OVRFLAG, __HAL_I2S_ENABLE, __HAL_I2S_GET_FLAG, __HAL_LOCK, __HAL_UNLOCK, __I2S_HandleTypeDef::ErrorCode, HAL_BUSY, HAL_ERROR, HAL_I2S_ERROR_NONE, HAL_I2S_ERROR_OVR, HAL_I2S_ERROR_TIMEOUT, HAL_I2S_STATE_BUSY_RX, HAL_I2S_STATE_READY, HAL_OK, I2S_DATAFORMAT_24B, I2S_DATAFORMAT_32B, I2S_FLAG_OVR, I2S_FLAG_RXNE, I2S_MODE_MASTER_RX, I2S_WaitFlagStateUntilTimeout(), __I2S_HandleTypeDef::Instance, __I2S_HandleTypeDef::pRxBuffPtr, __I2S_HandleTypeDef::RxXferCount, __I2S_HandleTypeDef::RxXferSize, and __I2S_HandleTypeDef::State.
HAL_StatusTypeDef HAL_I2S_Transmit_IT | ( | I2S_HandleTypeDef * | hi2s, |
uint16_t * | pData, | ||
uint16_t | Size ) |
#include <stm32f4xx_hal_i2s.h>
Transmit an amount of data in non-blocking mode with Interrupt.
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: |
HAL | status |
Definition at line 1057 of file stm32f4xx_hal_i2s.c.
References __HAL_I2S_ENABLE, __HAL_I2S_ENABLE_IT, __HAL_LOCK, __HAL_UNLOCK, __I2S_HandleTypeDef::ErrorCode, HAL_BUSY, HAL_ERROR, HAL_I2S_ERROR_NONE, HAL_I2S_STATE_BUSY_TX, HAL_I2S_STATE_READY, HAL_OK, I2S_DATAFORMAT_24B, I2S_DATAFORMAT_32B, I2S_IT_ERR, I2S_IT_TXE, __I2S_HandleTypeDef::Instance, __I2S_HandleTypeDef::pTxBuffPtr, __I2S_HandleTypeDef::State, __I2S_HandleTypeDef::TxXferCount, and __I2S_HandleTypeDef::TxXferSize.
HAL_StatusTypeDef HAL_I2S_Receive_IT | ( | I2S_HandleTypeDef * | hi2s, |
uint16_t * | pData, | ||
uint16_t | Size ) |
#include <stm32f4xx_hal_i2s.h>
Receive an amount of data in non-blocking mode with Interrupt.
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: |
HAL | status |
Definition at line 1123 of file stm32f4xx_hal_i2s.c.
References __HAL_I2S_ENABLE, __HAL_I2S_ENABLE_IT, __HAL_LOCK, __HAL_UNLOCK, __I2S_HandleTypeDef::ErrorCode, HAL_BUSY, HAL_ERROR, HAL_I2S_ERROR_NONE, HAL_I2S_STATE_BUSY_RX, HAL_I2S_STATE_READY, HAL_OK, I2S_DATAFORMAT_24B, I2S_DATAFORMAT_32B, I2S_IT_ERR, I2S_IT_RXNE, __I2S_HandleTypeDef::Instance, __I2S_HandleTypeDef::pRxBuffPtr, __I2S_HandleTypeDef::RxXferCount, __I2S_HandleTypeDef::RxXferSize, and __I2S_HandleTypeDef::State.
void HAL_I2S_IRQHandler | ( | I2S_HandleTypeDef * | hi2s | ) |
#include <stm32f4xx_hal_i2s.h>
This function handles I2S interrupt request.
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
None |
Definition at line 1659 of file stm32f4xx_hal_i2s.c.
References __I2S_HandleTypeDef::IrqHandlerISR.
HAL_StatusTypeDef HAL_I2S_Transmit_DMA | ( | I2S_HandleTypeDef * | hi2s, |
uint16_t * | pData, | ||
uint16_t | Size ) |
#include <stm32f4xx_hal_i2s.h>
Transmit an amount of data in non-blocking mode with DMA.
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: |
HAL | status |
Definition at line 1187 of file stm32f4xx_hal_i2s.c.
References __HAL_I2S_ENABLE, __HAL_LOCK, __HAL_UNLOCK, __I2S_HandleTypeDef::ErrorCode, HAL_BUSY, HAL_DMA_Start_IT(), HAL_ERROR, HAL_I2S_ERROR_DMA, HAL_I2S_ERROR_NONE, HAL_I2S_STATE_BUSY_TX, HAL_I2S_STATE_READY, HAL_IS_BIT_CLR, HAL_OK, __I2S_HandleTypeDef::hdmatx, I2S_DATAFORMAT_24B, I2S_DATAFORMAT_32B, I2S_DMAError(), I2S_DMATxCplt(), I2S_DMATxHalfCplt(), __I2S_HandleTypeDef::Instance, __I2S_HandleTypeDef::pTxBuffPtr, __I2S_HandleTypeDef::State, __I2S_HandleTypeDef::TxXferCount, __I2S_HandleTypeDef::TxXferSize, __DMA_HandleTypeDef::XferCpltCallback, __DMA_HandleTypeDef::XferErrorCallback, and __DMA_HandleTypeDef::XferHalfCpltCallback.
HAL_StatusTypeDef HAL_I2S_Receive_DMA | ( | I2S_HandleTypeDef * | hi2s, |
uint16_t * | pData, | ||
uint16_t | Size ) |
#include <stm32f4xx_hal_i2s.h>
Receive an amount of data in non-blocking mode with DMA.
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: |
HAL | status |
Definition at line 1278 of file stm32f4xx_hal_i2s.c.
References __HAL_I2S_CLEAR_OVRFLAG, __HAL_I2S_ENABLE, __HAL_LOCK, __HAL_UNLOCK, __I2S_HandleTypeDef::ErrorCode, HAL_BUSY, HAL_DMA_Start_IT(), HAL_ERROR, HAL_I2S_ERROR_DMA, HAL_I2S_ERROR_NONE, HAL_I2S_STATE_BUSY_RX, HAL_I2S_STATE_READY, HAL_IS_BIT_CLR, HAL_OK, __I2S_HandleTypeDef::hdmarx, I2S_DATAFORMAT_24B, I2S_DATAFORMAT_32B, I2S_DMAError(), I2S_DMARxCplt(), I2S_DMARxHalfCplt(), I2S_MODE_MASTER_RX, __I2S_HandleTypeDef::Instance, __I2S_HandleTypeDef::pRxBuffPtr, __I2S_HandleTypeDef::RxXferCount, __I2S_HandleTypeDef::RxXferSize, __I2S_HandleTypeDef::State, __DMA_HandleTypeDef::XferCpltCallback, __DMA_HandleTypeDef::XferErrorCallback, and __DMA_HandleTypeDef::XferHalfCpltCallback.
HAL_StatusTypeDef HAL_I2S_DMAPause | ( | I2S_HandleTypeDef * | hi2s | ) |
#include <stm32f4xx_hal_i2s.h>
Pauses the audio DMA Stream/Channel playing from the Media.
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
HAL | status |
Definition at line 1367 of file stm32f4xx_hal_i2s.c.
References __HAL_LOCK, __HAL_UNLOCK, HAL_I2S_STATE_BUSY_RX, HAL_I2S_STATE_BUSY_TX, HAL_I2S_STATE_BUSY_TX_RX, HAL_OK, __I2S_HandleTypeDef::Instance, and __I2S_HandleTypeDef::State.
HAL_StatusTypeDef HAL_I2S_DMAResume | ( | I2S_HandleTypeDef * | hi2s | ) |
#include <stm32f4xx_hal_i2s.h>
Resumes the audio DMA Stream/Channel playing from the Media.
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
HAL | status |
Definition at line 1407 of file stm32f4xx_hal_i2s.c.
References __HAL_I2S_ENABLE, __HAL_LOCK, __HAL_UNLOCK, HAL_I2S_STATE_BUSY_RX, HAL_I2S_STATE_BUSY_TX, HAL_I2S_STATE_BUSY_TX_RX, HAL_IS_BIT_CLR, HAL_OK, __I2S_HandleTypeDef::Instance, and __I2S_HandleTypeDef::State.
HAL_StatusTypeDef HAL_I2S_DMAStop | ( | I2S_HandleTypeDef * | hi2s | ) |
#include <stm32f4xx_hal_i2s.h>
Stops the audio DMA Stream/Channel playing from the Media.
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
HAL | status |
Definition at line 1461 of file stm32f4xx_hal_i2s.c.
References __HAL_I2S_CLEAR_OVRFLAG, __HAL_I2S_CLEAR_UDRFLAG, __HAL_I2S_DISABLE, __I2S_HandleTypeDef::ErrorCode, HAL_DMA_Abort(), HAL_ERROR, HAL_GetTick(), HAL_I2S_ERROR_BUSY_LINE_RX, HAL_I2S_ERROR_DMA, HAL_I2S_ERROR_TIMEOUT, HAL_I2S_STATE_BUSY_TX_RX, HAL_I2S_STATE_READY, HAL_OK, __I2S_HandleTypeDef::hdmarx, __I2S_HandleTypeDef::hdmatx, I2S_FLAG_BSY, I2S_FLAG_TXE, I2S_MODE_MASTER_RX, I2S_MODE_MASTER_TX, I2S_MODE_SLAVE_RX, I2S_MODE_SLAVE_TX, I2S_TIMEOUT_FLAG, I2S_WaitFlagStateUntilTimeout(), __I2S_HandleTypeDef::Init, __I2S_HandleTypeDef::Instance, I2S_InitTypeDef::Mode, and __I2S_HandleTypeDef::State.
__weak void HAL_I2S_TxHalfCpltCallback | ( | I2S_HandleTypeDef * | hi2s | ) |
#include <stm32f4xx_hal_i2s.h>
Tx Transfer Half completed callbacks.
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
None |
Definition at line 1671 of file stm32f4xx_hal_i2s.c.
References UNUSED.
Referenced by HAL_I2S_Init(), and I2S_DMATxHalfCplt().
__weak void HAL_I2S_TxCpltCallback | ( | I2S_HandleTypeDef * | hi2s | ) |
#include <stm32f4xx_hal_i2s.h>
Tx Transfer completed callbacks.
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
None |
Definition at line 1687 of file stm32f4xx_hal_i2s.c.
References UNUSED.
Referenced by HAL_I2S_Init(), I2S_DMATxCplt(), and I2S_Transmit_IT().
__weak void HAL_I2S_RxHalfCpltCallback | ( | I2S_HandleTypeDef * | hi2s | ) |
#include <stm32f4xx_hal_i2s.h>
Rx Transfer half completed callbacks.
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
None |
Definition at line 1703 of file stm32f4xx_hal_i2s.c.
References UNUSED.
Referenced by HAL_I2S_Init(), and I2S_DMARxHalfCplt().
__weak void HAL_I2S_RxCpltCallback | ( | I2S_HandleTypeDef * | hi2s | ) |
#include <stm32f4xx_hal_i2s.h>
Rx Transfer completed callbacks.
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
None |
Definition at line 1719 of file stm32f4xx_hal_i2s.c.
References UNUSED.
Referenced by HAL_I2S_Init(), I2S_DMARxCplt(), and I2S_Receive_IT().
__weak void HAL_I2S_ErrorCallback | ( | I2S_HandleTypeDef * | hi2s | ) |
#include <stm32f4xx_hal_i2s.h>
I2S error callbacks.
hi2s | pointer to a I2S_HandleTypeDef structure that contains the configuration information for I2S module |
None |
Definition at line 1735 of file stm32f4xx_hal_i2s.c.
References UNUSED.
Referenced by HAL_I2S_Init(), I2S_DMAError(), and I2S_IRQHandler().