tae32f53xx_ll_fpll.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /**
  2. ******************************************************************************
  3. * @file tae32f53xx_ll_fpll.h
  4. * @author MCD Application Team
  5. * @brief Header file for FPLL LL Module
  6. *
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * <h2><center>&copy; Copyright (c) 2020 Tai-Action.
  11. * All rights reserved.</center></h2>
  12. *
  13. * This software is licensed by Tai-Action under BSD 3-Clause license,
  14. * the "License"; You may not use this file except in compliance with the
  15. * License. You may obtain a copy of the License at:
  16. * opensource.org/licenses/BSD-3-Clause
  17. *
  18. ******************************************************************************
  19. */
  20. /* Define to prevent recursive inclusion -------------------------------------*/
  21. #ifndef _TAE32F53XX_LL_FPLL_H_
  22. #define _TAE32F53XX_LL_FPLL_H_
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif /* __cplusplus */
  26. /* Includes ------------------------------------------------------------------*/
  27. #include "tae32f53xx_ll_def.h"
  28. /** @addtogroup TAE32F53xx_LL_Driver
  29. * @{
  30. */
  31. /** @addtogroup FPLL_LL
  32. * @{
  33. */
  34. /* Exported types ------------------------------------------------------------*/
  35. /* Exported constants --------------------------------------------------------*/
  36. /* Exported macro ------------------------------------------------------------*/
  37. /** @defgroup FPLL_LL_Exported_Macros FPLL LL Exported Macros
  38. * @brief FPLL LL Exported Macros
  39. * @{
  40. */
  41. /**
  42. * @brief FPLL Enable
  43. * @param __FPLL__ Specifies FPLL peripheral
  44. * @return None
  45. */
  46. #define __LL_FPLL_En(__FPLL__) SET_BIT((__FPLL__)->FCR, FPLL_EN_Msk)
  47. /**
  48. * @brief FPLL Disable
  49. * @param __FPLL__ Specifies FPLL peripheral
  50. * @return None
  51. */
  52. #define __LL_FPLL_Dis(__FPLL__) CLEAR_BIT((__FPLL__)->FCR, FPLL_EN_Msk)
  53. /**
  54. * @brief FPLL Start
  55. * @param __FPLL__ Specifies FPLL peripheral
  56. * @return None
  57. */
  58. #define __LL_FPLL_Start(__FPLL__) SET_BIT((__FPLL__)->FCR, FPLL_START_Msk)
  59. /**
  60. * @brief FPLL Div Integer Set
  61. * @param __FPLL__ Specifies FPLL peripheral
  62. * @param integer FPLL Div Integer
  63. * @return None
  64. */
  65. #define __LL_FPLL_DivInt_Set(__FPLL__, integer) \
  66. MODIFY_REG((__FPLL__)->FDR, FPLL_DIV_INT_Msk, ((integer & 0x3fffUL) << FPLL_DIV_INT_Pos))
  67. /**
  68. * @brief FPLL Div Fraction Set
  69. * @param __FPLL__ Specifies FPLL peripheral
  70. * @param frac FPLL Div Fraction
  71. * @return None
  72. */
  73. #define __LL_FPLL_DivFrac_Set(__FPLL__, frac) \
  74. MODIFY_REG((__FPLL__)->FDR, FPLL_DIV_FRAC_Msk, ((frac & 0xffffUL) << FPLL_DIV_FRAC_Pos))
  75. /**
  76. * @}
  77. */
  78. /* Exported functions --------------------------------------------------------*/
  79. /** @addtogroup FPLL_LL_Exported_Functions
  80. * @{
  81. */
  82. /** @addtogroup FPLL_LL_Exported_Functions_Group1
  83. * @{
  84. */
  85. LL_StatusETypeDef LL_FPLL_Init(FPLL_TypeDef *Instance);
  86. LL_StatusETypeDef LL_FPLL_DeInit(FPLL_TypeDef *Instance);
  87. void LL_FPLL_MspInit(FPLL_TypeDef *Instance);
  88. void LL_FPLL_MspDeInit(FPLL_TypeDef *Instance);
  89. /**
  90. * @}
  91. */
  92. /** @addtogroup FPLL_LL_Exported_Functions_Group2
  93. * @{
  94. */
  95. LL_StatusETypeDef LL_FPLL_DivStart(FPLL_TypeDef *Instance, uint16_t integer, uint16_t frac);
  96. /**
  97. * @}
  98. */
  99. /**
  100. * @}
  101. */
  102. /* Private types -------------------------------------------------------------*/
  103. /* Private variables ---------------------------------------------------------*/
  104. /* Private constants ---------------------------------------------------------*/
  105. /* Private macros ------------------------------------------------------------*/
  106. /* Private functions ---------------------------------------------------------*/
  107. /**
  108. * @}
  109. */
  110. /**
  111. * @}
  112. */
  113. #ifdef __cplusplus
  114. }
  115. #endif /* __cplusplus */
  116. #endif /* _TAE32F53XX_LL_FPLL_H_ */
  117. /************************* (C) COPYRIGHT Tai-Action *****END OF FILE***********/