STM32F4xx_HAL_Driver  1.8.3
stm32f4xx_hal_sai.h File Reference

Header file of SAI HAL module. More...

Go to the source code of this file.

Data Structures

struct  SAI_InitTypeDef
 
struct  SAI_FrameInitTypeDef
 
struct  SAI_SlotInitTypeDef
 
struct  __SAI_HandleTypeDef
 

Typedefs

typedef void(* SAIcallback) (void)
 SAI Callback prototype.
 
typedef struct __SAI_HandleTypeDef SAI_HandleTypeDef
 
typedef void(* pSAI_CallbackTypeDef) (SAI_HandleTypeDef *hsai)
 SAI callback pointer definition.
 

Enumerations

enum  HAL_SAI_StateTypeDef {
  HAL_SAI_STATE_RESET = 0x00U , HAL_SAI_STATE_READY = 0x01U , HAL_SAI_STATE_BUSY = 0x02U , HAL_SAI_STATE_BUSY_TX = 0x12U ,
  HAL_SAI_STATE_BUSY_RX = 0x22U , HAL_SAI_STATE_TIMEOUT = 0x03U , HAL_SAI_STATE_ERROR = 0x04U
}
 HAL State structures definition. More...
 
enum  HAL_SAI_CallbackIDTypeDef {
  HAL_SAI_RX_COMPLETE_CB_ID = 0x00U , HAL_SAI_RX_HALFCOMPLETE_CB_ID = 0x01U , HAL_SAI_TX_COMPLETE_CB_ID = 0x02U , HAL_SAI_TX_HALFCOMPLETE_CB_ID = 0x03U ,
  HAL_SAI_ERROR_CB_ID = 0x04U , HAL_SAI_MSPINIT_CB_ID = 0x05U , HAL_SAI_MSPDEINIT_CB_ID = 0x06U
}
 SAI callback ID enumeration definition. More...
 

Functions

HAL_StatusTypeDef HAL_SAI_InitProtocol (SAI_HandleTypeDef *hsai, uint32_t protocol, uint32_t datasize, uint32_t nbslot)
 Initialize the structure FrameInit, SlotInit and the low part of Init according to the specified parameters and call the function HAL_SAI_Init to initialize the SAI block. More...
 
HAL_StatusTypeDef HAL_SAI_Init (SAI_HandleTypeDef *hsai)
 Initialize the SAI according to the specified parameters. in the SAI_InitTypeDef structure and initialize the associated handle. More...
 
HAL_StatusTypeDef HAL_SAI_DeInit (SAI_HandleTypeDef *hsai)
 DeInitialize the SAI peripheral. More...
 
void HAL_SAI_MspInit (SAI_HandleTypeDef *hsai)
 Initialize the SAI MSP. More...
 
void HAL_SAI_MspDeInit (SAI_HandleTypeDef *hsai)
 DeInitialize the SAI MSP. More...
 
HAL_StatusTypeDef HAL_SAI_RegisterCallback (SAI_HandleTypeDef *hsai, HAL_SAI_CallbackIDTypeDef CallbackID, pSAI_CallbackTypeDef pCallback)
 Register a user SAI callback to be used instead of the weak predefined callback. More...
 
HAL_StatusTypeDef HAL_SAI_UnRegisterCallback (SAI_HandleTypeDef *hsai, HAL_SAI_CallbackIDTypeDef CallbackID)
 Unregister a user SAI callback. SAI callback is redirected to the weak predefined callback. More...
 
HAL_StatusTypeDef HAL_SAI_Transmit (SAI_HandleTypeDef *hsai, uint8_t *pData, uint16_t Size, uint32_t Timeout)
 Transmit an amount of data in blocking mode. More...
 
HAL_StatusTypeDef HAL_SAI_Receive (SAI_HandleTypeDef *hsai, uint8_t *pData, uint16_t Size, uint32_t Timeout)
 Receive an amount of data in blocking mode. More...
 
HAL_StatusTypeDef HAL_SAI_Transmit_IT (SAI_HandleTypeDef *hsai, uint8_t *pData, uint16_t Size)
 Transmit an amount of data in non-blocking mode with Interrupt. More...
 
HAL_StatusTypeDef HAL_SAI_Receive_IT (SAI_HandleTypeDef *hsai, uint8_t *pData, uint16_t Size)
 Receive an amount of data in non-blocking mode with Interrupt. More...
 
HAL_StatusTypeDef HAL_SAI_Transmit_DMA (SAI_HandleTypeDef *hsai, uint8_t *pData, uint16_t Size)
 Transmit an amount of data in non-blocking mode with DMA. More...
 
HAL_StatusTypeDef HAL_SAI_Receive_DMA (SAI_HandleTypeDef *hsai, uint8_t *pData, uint16_t Size)
 Receive an amount of data in non-blocking mode with DMA. More...
 
HAL_StatusTypeDef HAL_SAI_DMAPause (SAI_HandleTypeDef *hsai)
 Pause the audio stream playing from the Media. More...
 
HAL_StatusTypeDef HAL_SAI_DMAResume (SAI_HandleTypeDef *hsai)
 Resume the audio stream playing from the Media. More...
 
HAL_StatusTypeDef HAL_SAI_DMAStop (SAI_HandleTypeDef *hsai)
 Stop the audio stream playing from the Media. More...
 
HAL_StatusTypeDef HAL_SAI_Abort (SAI_HandleTypeDef *hsai)
 Abort the current transfer and disable the SAI. More...
 
HAL_StatusTypeDef HAL_SAI_EnableTxMuteMode (SAI_HandleTypeDef *hsai, uint16_t val)
 Enable the Tx mute mode. More...
 
HAL_StatusTypeDef HAL_SAI_DisableTxMuteMode (SAI_HandleTypeDef *hsai)
 Disable the Tx mute mode. More...
 
HAL_StatusTypeDef HAL_SAI_EnableRxMuteMode (SAI_HandleTypeDef *hsai, SAIcallback callback, uint16_t counter)
 Enable the Rx mute detection. More...
 
HAL_StatusTypeDef HAL_SAI_DisableRxMuteMode (SAI_HandleTypeDef *hsai)
 Disable the Rx mute detection. More...
 
void HAL_SAI_IRQHandler (SAI_HandleTypeDef *hsai)
 Handle SAI interrupt request. More...
 
void HAL_SAI_TxHalfCpltCallback (SAI_HandleTypeDef *hsai)
 Tx Transfer Half completed callback. More...
 
void HAL_SAI_TxCpltCallback (SAI_HandleTypeDef *hsai)
 Tx Transfer completed callback. More...
 
void HAL_SAI_RxHalfCpltCallback (SAI_HandleTypeDef *hsai)
 Rx Transfer half completed callback. More...
 
void HAL_SAI_RxCpltCallback (SAI_HandleTypeDef *hsai)
 Rx Transfer completed callback. More...
 
void HAL_SAI_ErrorCallback (SAI_HandleTypeDef *hsai)
 SAI error callback. More...
 
HAL_SAI_StateTypeDef HAL_SAI_GetState (const SAI_HandleTypeDef *hsai)
 Return the SAI handle state. More...
 
uint32_t HAL_SAI_GetError (const SAI_HandleTypeDef *hsai)
 Return the SAI error code. More...
 

Detailed Description

Header file of SAI HAL module.

Author
MCD Application Team
Attention

Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Definition in file stm32f4xx_hal_sai.h.