STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
stm32f4xx_hal_sai_ex.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef __STM32F4xx_HAL_SAI_EX_H
21#define __STM32F4xx_HAL_SAI_EX_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* Includes ------------------------------------------------------------------*/
28#include "stm32f4xx_hal_def.h"
29
38#if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || \
39 defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F413xx) || \
40 defined(STM32F423xx)
41
42/* Exported types ------------------------------------------------------------*/
43/* Exported constants --------------------------------------------------------*/
47#if defined(STM32F413xx) || defined(STM32F423xx)
48#define SAI_CLKSOURCE_PLLI2S 0x00000000U
49#define SAI_CLKSOURCE_EXT 0x00100000U
50#define SAI_CLKSOURCE_PLLR 0x00200000U
51#define SAI_CLKSOURCE_HS 0x00300000U
52#else
53#define SAI_CLKSOURCE_PLLSAI 0x00000000U
54#define SAI_CLKSOURCE_PLLI2S 0x00100000U
55#define SAI_CLKSOURCE_EXT 0x00200000U
56#define SAI_CLKSOURCE_NA 0x00400000U
57#endif
58
59
64/* Exported functions --------------------------------------------------------*/
73/* Extended features functions ************************************************/
75uint32_t SAI_GetInputClock(const SAI_HandleTypeDef *hsai);
83/* Private types -------------------------------------------------------------*/
84/* Private variables ---------------------------------------------------------*/
85/* Private constants ---------------------------------------------------------*/
86/* Private macros ------------------------------------------------------------*/
87#if defined(STM32F413xx) || defined(STM32F423xx)
88#define IS_SAI_CLK_SOURCE(SOURCE) (((SOURCE) == SAI_CLKSOURCE_PLLI2S) ||\
89 ((SOURCE) == SAI_CLKSOURCE_EXT)||\
90 ((SOURCE) == SAI_CLKSOURCE_PLLR)||\
91 ((SOURCE) == SAI_CLKSOURCE_HS))
92#else
93#define IS_SAI_CLK_SOURCE(SOURCE) (((SOURCE) == SAI_CLKSOURCE_PLLSAI) ||\
94 ((SOURCE) == SAI_CLKSOURCE_EXT)||\
95 ((SOURCE) == SAI_CLKSOURCE_PLLI2S)||\
96 ((SOURCE) == SAI_CLKSOURCE_NA))
97#endif
98/* Private functions ---------------------------------------------------------*/
99
100#endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx || STM32F413xx || STM32F423xx */
109#ifdef __cplusplus
110}
111#endif
112
113#endif /* __STM32F4xx_HAL_SAI_EX_H */
114
void SAI_BlockSynchroConfig(const SAI_HandleTypeDef *hsai)
Configure SAI Block synchronization mode.
uint32_t SAI_GetInputClock(const SAI_HandleTypeDef *hsai)
Get SAI Input Clock based on SAI source clock selection.
This file contains HAL common defines, enumeration, macros and structures definitions.