Initialization and Configuration functions.  
More...
Initialization and Configuration functions. 
 ===============================================================================
            ##### Initialization and de-initialization functions #####
 ===============================================================================
  [..]  This subsection provides a set of functions allowing to initialize and
        de-initialize the SAIx peripheral:
      (+) User must implement HAL_SAI_MspInit() function in which he configures
          all related peripherals resources (CLOCK, GPIO, DMA, IT and NVIC ).
      (+) Call the function HAL_SAI_Init() to configure the selected device with
          the selected configuration:
        (++) Mode (Master/slave TX/RX)
        (++) Protocol
        (++) Data Size
        (++) MCLK Output
        (++) Audio frequency
        (++) FIFO Threshold
        (++) Frame Config
        (++) Slot Config
      (+) Call the function HAL_SAI_DeInit() to restore the default configuration
          of the selected SAI peripheral. 
◆ HAL_SAI_DeInit()
DeInitialize the SAI peripheral. 
- Parameters
- 
  
    | hsai | pointer to a SAI_HandleTypeDef structure that contains the configuration information for SAI module. |  
 
- Return values
- 
  
  
Definition at line 569 of file stm32f4xx_hal_sai.c.
 
 
◆ HAL_SAI_Init()
Initialize the SAI according to the specified parameters. in the SAI_InitTypeDef structure and initialize the associated handle. 
- Parameters
- 
  
    | hsai | pointer to a SAI_HandleTypeDef structure that contains the configuration information for SAI module. |  
 
- Return values
- 
  
  
Definition at line 372 of file stm32f4xx_hal_sai.c.
 
 
◆ HAL_SAI_InitProtocol()
      
        
          | 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. 
- Parameters
- 
  
    | hsai | pointer to a SAI_HandleTypeDef structure that contains the configuration information for SAI module. |  | protocol | one of the supported protocol SAI Supported protocol |  | datasize | one of the supported datasize SAI protocol data size the configuration information for SAI module. |  | nbslot | Number of slot. |  
 
- Return values
- 
  
  
Definition at line 333 of file stm32f4xx_hal_sai.c.
 
 
◆ HAL_SAI_MspDeInit()
DeInitialize the SAI MSP. 
- Parameters
- 
  
    | hsai | pointer to a SAI_HandleTypeDef structure that contains the configuration information for SAI module. |  
 
- Return values
- 
  
  
Definition at line 634 of file stm32f4xx_hal_sai.c.
 
 
◆ HAL_SAI_MspInit()
Initialize the SAI MSP. 
- Parameters
- 
  
    | hsai | pointer to a SAI_HandleTypeDef structure that contains the configuration information for SAI module. |  
 
- Return values
- 
  
  
Definition at line 618 of file stm32f4xx_hal_sai.c.
 
 
◆ HAL_SAI_RegisterCallback()
Register a user SAI callback to be used instead of the weak predefined callback. 
- Parameters
- 
  
    | hsai | SAI handle. |  | CallbackID | ID of the callback to be registered. This parameter can be one of the following values: |  | pCallback | pointer to the callback function. |  
 
- Return values
- 
  
  
Definition at line 661 of file stm32f4xx_hal_sai.c.
 
 
◆ HAL_SAI_UnRegisterCallback()
Unregister a user SAI callback. SAI callback is redirected to the weak predefined callback. 
- Parameters
- 
  
    | hsai | SAI handle. |  | CallbackID | ID of the callback to be unregistered. This parameter can be one of the following values: |  
 
- Return values
- 
  
  
Definition at line 753 of file stm32f4xx_hal_sai.c.