STM32F479xx HAL User Manual
|
00001 /** 00002 ****************************************************************************** 00003 * @file stm32f4xx_hal_sai_ex.h 00004 * @author MCD Application Team 00005 * @brief Header file of SAI Extension HAL module. 00006 ****************************************************************************** 00007 * @attention 00008 * 00009 * <h2><center>© Copyright (c) 2017 STMicroelectronics. 00010 * All rights reserved.</center></h2> 00011 * 00012 * This software component is licensed by ST under BSD 3-Clause license, 00013 * the "License"; You may not use this file except in compliance with the 00014 * License. You may obtain a copy of the License at: 00015 * opensource.org/licenses/BSD-3-Clause 00016 * 00017 ****************************************************************************** 00018 */ 00019 00020 /* Define to prevent recursive inclusion -------------------------------------*/ 00021 #ifndef __STM32F4xx_HAL_SAI_EX_H 00022 #define __STM32F4xx_HAL_SAI_EX_H 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 /* Includes ------------------------------------------------------------------*/ 00029 #include "stm32f4xx_hal_def.h" 00030 00031 /** @addtogroup STM32F4xx_HAL_Driver 00032 * @{ 00033 */ 00034 00035 /** @addtogroup SAIEx 00036 * @{ 00037 */ 00038 00039 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || \ 00040 defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F413xx) || \ 00041 defined(STM32F423xx) 00042 00043 /* Exported types ------------------------------------------------------------*/ 00044 /* Exported constants --------------------------------------------------------*/ 00045 /** @defgroup SAI_Clock_Source SAI Clock Source 00046 * @{ 00047 */ 00048 #if defined(STM32F413xx) || defined(STM32F423xx) 00049 #define SAI_CLKSOURCE_PLLI2S 0x00000000U 00050 #define SAI_CLKSOURCE_EXT 0x00100000U 00051 #define SAI_CLKSOURCE_PLLR 0x00200000U 00052 #define SAI_CLKSOURCE_HS 0x00300000U 00053 #else 00054 #define SAI_CLKSOURCE_PLLSAI 0x00000000U 00055 #define SAI_CLKSOURCE_PLLI2S 0x00100000U 00056 #define SAI_CLKSOURCE_EXT 0x00200000U 00057 #define SAI_CLKSOURCE_NA 0x00400000U /*!< No applicable for STM32F446xx */ 00058 #endif 00059 00060 00061 /** 00062 * @} 00063 */ 00064 00065 /* Exported functions --------------------------------------------------------*/ 00066 /** @addtogroup SAIEx_Exported_Functions 00067 * @{ 00068 */ 00069 00070 /** @addtogroup SAIEx_Exported_Functions_Group1 00071 * @{ 00072 */ 00073 00074 /* Extended features functions ************************************************/ 00075 void SAI_BlockSynchroConfig(SAI_HandleTypeDef *hsai); 00076 uint32_t SAI_GetInputClock(SAI_HandleTypeDef *hsai); 00077 /** 00078 * @} 00079 */ 00080 00081 /** 00082 * @} 00083 */ 00084 /* Private types -------------------------------------------------------------*/ 00085 /* Private variables ---------------------------------------------------------*/ 00086 /* Private constants ---------------------------------------------------------*/ 00087 /* Private macros ------------------------------------------------------------*/ 00088 #if defined(STM32F413xx) || defined(STM32F423xx) 00089 #define IS_SAI_CLK_SOURCE(SOURCE) (((SOURCE) == SAI_CLKSOURCE_PLLI2S) ||\ 00090 ((SOURCE) == SAI_CLKSOURCE_EXT)||\ 00091 ((SOURCE) == SAI_CLKSOURCE_PLLR)||\ 00092 ((SOURCE) == SAI_CLKSOURCE_HS)) 00093 #else 00094 #define IS_SAI_CLK_SOURCE(SOURCE) (((SOURCE) == SAI_CLKSOURCE_PLLSAI) ||\ 00095 ((SOURCE) == SAI_CLKSOURCE_EXT)||\ 00096 ((SOURCE) == SAI_CLKSOURCE_PLLI2S)||\ 00097 ((SOURCE) == SAI_CLKSOURCE_NA)) 00098 #endif 00099 /* Private functions ---------------------------------------------------------*/ 00100 00101 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx || STM32F413xx || STM32F423xx */ 00102 /** 00103 * @} 00104 */ 00105 00106 /** 00107 * @} 00108 */ 00109 00110 #ifdef __cplusplus 00111 } 00112 #endif 00113 00114 #endif /* __STM32F4xx_HAL_SAI_EX_H */ 00115 00116 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/