L4 HAL Drivers

Embed: (wiki syntax)

« Back to documentation index

Initialization and de-initialization functions

Initialization and de-initialization functions
[SAI Exported Functions]

Initialization and Configuration functions. 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.
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.
HAL_StatusTypeDef HAL_SAI_DeInit (SAI_HandleTypeDef *hsai)
 DeInitialize the SAI peripheral.
__weak void HAL_SAI_MspInit (SAI_HandleTypeDef *hsai)
 Initialize the SAI MSP.
__weak void HAL_SAI_MspDeInit (SAI_HandleTypeDef *hsai)
 DeInitialize the SAI MSP.

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_StatusTypeDef HAL_SAI_DeInit ( SAI_HandleTypeDef *  hsai )

DeInitialize the SAI peripheral.

Parameters:
hsai,:pointer to a SAI_HandleTypeDef structure that contains the configuration information for SAI module.
Return values:
HALstatus

Definition at line 480 of file stm32l4xx_hal_sai.c.

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:
hsai,:pointer to a SAI_HandleTypeDef structure that contains the configuration information for SAI module.
Return values:
HALstatus

Definition at line 315 of file stm32l4xx_hal_sai.c.

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_Protocol
datasize,:one of the supported datasize SAI_Protocol_DataSize the configuration information for SAI module.
nbslot,:Number of slot.
Return values:
HALstatus

Definition at line 280 of file stm32l4xx_hal_sai.c.

__weak void HAL_SAI_MspDeInit ( SAI_HandleTypeDef *  hsai )

DeInitialize the SAI MSP.

Parameters:
hsai,:pointer to a SAI_HandleTypeDef structure that contains the configuration information for SAI module.
Return values:
None

Definition at line 531 of file stm32l4xx_hal_sai.c.

__weak void HAL_SAI_MspInit ( SAI_HandleTypeDef *  hsai )

Initialize the SAI MSP.

Parameters:
hsai,:pointer to a SAI_HandleTypeDef structure that contains the configuration information for SAI module.
Return values:
None

Definition at line 518 of file stm32l4xx_hal_sai.c.