STM32F4xx_HAL_Driver  1.8.3
Initialization and de-initialization functions

Initialization and Configuration functions. More...

+ Collaboration diagram for Initialization and de-initialization functions:

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...
 

Detailed Description

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.

Function Documentation

◆ HAL_SAI_DeInit()

HAL_StatusTypeDef HAL_SAI_DeInit ( SAI_HandleTypeDef hsai)

DeInitialize the SAI peripheral.

Parameters
hsaipointer to a SAI_HandleTypeDef structure that contains the configuration information for SAI module.
Return values
HALstatus

Definition at line 569 of file stm32f4xx_hal_sai.c.

◆ HAL_SAI_Init()

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.

Parameters
hsaipointer to a SAI_HandleTypeDef structure that contains the configuration information for SAI module.
Return values
HALstatus

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
hsaipointer to a SAI_HandleTypeDef structure that contains the configuration information for SAI module.
protocolone of the supported protocol SAI Supported protocol
datasizeone of the supported datasize SAI protocol data size the configuration information for SAI module.
nbslotNumber of slot.
Return values
HALstatus

Definition at line 333 of file stm32f4xx_hal_sai.c.

◆ HAL_SAI_MspDeInit()

__weak void HAL_SAI_MspDeInit ( SAI_HandleTypeDef hsai)

DeInitialize the SAI MSP.

Parameters
hsaipointer to a SAI_HandleTypeDef structure that contains the configuration information for SAI module.
Return values
None

Definition at line 634 of file stm32f4xx_hal_sai.c.

◆ HAL_SAI_MspInit()

__weak void HAL_SAI_MspInit ( SAI_HandleTypeDef hsai)

Initialize the SAI MSP.

Parameters
hsaipointer to a SAI_HandleTypeDef structure that contains the configuration information for SAI module.
Return values
None

Definition at line 618 of file stm32f4xx_hal_sai.c.

◆ HAL_SAI_RegisterCallback()

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.

Parameters
hsaiSAI handle.
CallbackIDID of the callback to be registered. This parameter can be one of the following values:
pCallbackpointer to the callback function.
Return values
HALstatus.

Definition at line 661 of file stm32f4xx_hal_sai.c.

◆ HAL_SAI_UnRegisterCallback()

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.

Parameters
hsaiSAI handle.
CallbackIDID of the callback to be unregistered. This parameter can be one of the following values:
Return values
HALstatus.

Definition at line 753 of file stm32f4xx_hal_sai.c.