您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

117 行
3.9 KiB

  1. /**
  2. ******************************************************************************
  3. * @file stm32f4xx_hal_sai_ex.h
  4. * @author MCD Application Team
  5. * @brief Header file of SAI Extension HAL module.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under BSD 3-Clause license,
  13. * the "License"; You may not use this file except in compliance with the
  14. * License. You may obtain a copy of the License at:
  15. * opensource.org/licenses/BSD-3-Clause
  16. *
  17. ******************************************************************************
  18. */
  19. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef __STM32F4xx_HAL_SAI_EX_H
  21. #define __STM32F4xx_HAL_SAI_EX_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "stm32f4xx_hal_def.h"
  27. /** @addtogroup STM32F4xx_HAL_Driver
  28. * @{
  29. */
  30. /** @addtogroup SAIEx
  31. * @{
  32. */
  33. #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || \
  34. defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F413xx) || \
  35. defined(STM32F423xx)
  36. /* Exported types ------------------------------------------------------------*/
  37. /* Exported constants --------------------------------------------------------*/
  38. /** @defgroup SAI_Clock_Source SAI Clock Source
  39. * @{
  40. */
  41. #if defined(STM32F413xx) || defined(STM32F423xx)
  42. #define SAI_CLKSOURCE_PLLI2S 0x00000000U
  43. #define SAI_CLKSOURCE_EXT 0x00100000U
  44. #define SAI_CLKSOURCE_PLLR 0x00200000U
  45. #define SAI_CLKSOURCE_HS 0x00300000U
  46. #else
  47. #define SAI_CLKSOURCE_PLLSAI 0x00000000U
  48. #define SAI_CLKSOURCE_PLLI2S 0x00100000U
  49. #define SAI_CLKSOURCE_EXT 0x00200000U
  50. #define SAI_CLKSOURCE_NA 0x00400000U /*!< No applicable for STM32F446xx */
  51. #endif
  52. /**
  53. * @}
  54. */
  55. /* Exported functions --------------------------------------------------------*/
  56. /** @addtogroup SAIEx_Exported_Functions
  57. * @{
  58. */
  59. /** @addtogroup SAIEx_Exported_Functions_Group1
  60. * @{
  61. */
  62. /* Extended features functions ************************************************/
  63. void SAI_BlockSynchroConfig(SAI_HandleTypeDef *hsai);
  64. uint32_t SAI_GetInputClock(SAI_HandleTypeDef *hsai);
  65. /**
  66. * @}
  67. */
  68. /**
  69. * @}
  70. */
  71. /* Private types -------------------------------------------------------------*/
  72. /* Private variables ---------------------------------------------------------*/
  73. /* Private constants ---------------------------------------------------------*/
  74. /* Private macros ------------------------------------------------------------*/
  75. #if defined(STM32F413xx) || defined(STM32F423xx)
  76. #define IS_SAI_CLK_SOURCE(SOURCE) (((SOURCE) == SAI_CLKSOURCE_PLLI2S) ||\
  77. ((SOURCE) == SAI_CLKSOURCE_EXT)||\
  78. ((SOURCE) == SAI_CLKSOURCE_PLLR)||\
  79. ((SOURCE) == SAI_CLKSOURCE_HS))
  80. #else
  81. #define IS_SAI_CLK_SOURCE(SOURCE) (((SOURCE) == SAI_CLKSOURCE_PLLSAI) ||\
  82. ((SOURCE) == SAI_CLKSOURCE_EXT)||\
  83. ((SOURCE) == SAI_CLKSOURCE_PLLI2S)||\
  84. ((SOURCE) == SAI_CLKSOURCE_NA))
  85. #endif
  86. /* Private functions ---------------------------------------------------------*/
  87. #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx || STM32F479xx || STM32F413xx || STM32F423xx */
  88. /**
  89. * @}
  90. */
  91. /**
  92. * @}
  93. */
  94. #ifdef __cplusplus
  95. }
  96. #endif
  97. #endif /* __STM32F4xx_HAL_SAI_EX_H */
  98. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/