hc32_ll_fcg.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. /**
  2. *******************************************************************************
  3. * @file hc32_ll_fcg.h
  4. * @brief This file contains all the functions prototypes of the FCG driver
  5. * library.
  6. @verbatim
  7. Change Logs:
  8. Date Author Notes
  9. 2022-12-31 CDT First version
  10. @endverbatim
  11. *******************************************************************************
  12. * Copyright (C) 2022, Xiaohua Semiconductor Co., Ltd. All rights reserved.
  13. *
  14. * This software component is licensed by XHSC under BSD 3-Clause license
  15. * (the "License"); You may not use this file except in compliance with the
  16. * License. You may obtain a copy of the License at:
  17. * opensource.org/licenses/BSD-3-Clause
  18. *
  19. *******************************************************************************
  20. */
  21. #ifndef __HC32_LL_FCG_H__
  22. #define __HC32_LL_FCG_H__
  23. /* C binding of definitions if building with C++ compiler */
  24. #ifdef __cplusplus
  25. extern "C"
  26. {
  27. #endif
  28. /*******************************************************************************
  29. * Include files
  30. ******************************************************************************/
  31. #include "hc32_ll_def.h"
  32. #include "hc32f4xx.h"
  33. #include "hc32f4xx_conf.h"
  34. /**
  35. * @addtogroup LL_Driver
  36. * @{
  37. */
  38. /**
  39. * @addtogroup LL_FCG
  40. * @{
  41. */
  42. #if (LL_FCG_ENABLE == DDL_ON)
  43. /*******************************************************************************
  44. * Global type definitions ('typedef')
  45. ******************************************************************************/
  46. /*******************************************************************************
  47. * Global pre-processor symbols/macros ('#define')
  48. ******************************************************************************/
  49. /**
  50. * @defgroup FCG_Global_Macros FCG Global Macros
  51. * @{
  52. */
  53. /**
  54. * @defgroup FCG_FCG0_Peripheral FCG FCG0 peripheral
  55. * @{
  56. */
  57. #define FCG0_PERIPH_SRAMH (PWC_FCG0_SRAMH)
  58. #define FCG0_PERIPH_SRAM0 (PWC_FCG0_SRAM0)
  59. #define FCG0_PERIPH_SRAMB (PWC_FCG0_SRAMB)
  60. #define FCG0_PERIPH_KEY (PWC_FCG0_KEY)
  61. #define FCG0_PERIPH_DMA1 (PWC_FCG0_DMA1)
  62. #define FCG0_PERIPH_DMA2 (PWC_FCG0_DMA2)
  63. #define FCG0_PERIPH_FCM (PWC_FCG0_FCM)
  64. #define FCG0_PERIPH_AOS (PWC_FCG0_AOS)
  65. #define FCG0_PERIPH_CTC (PWC_FCG0_CTC)
  66. #define FCG0_PERIPH_AES (PWC_FCG0_AES)
  67. #define FCG0_PERIPH_HASH (PWC_FCG0_HASH)
  68. #define FCG0_PERIPH_TRNG (PWC_FCG0_TRNG)
  69. #define FCG0_PERIPH_CRC (PWC_FCG0_CRC)
  70. #define FCG0_PERIPH_DCU1 (PWC_FCG0_DCU1)
  71. #define FCG0_PERIPH_DCU2 (PWC_FCG0_DCU2)
  72. #define FCG0_PERIPH_DCU3 (PWC_FCG0_DCU3)
  73. #define FCG0_PERIPH_DCU4 (PWC_FCG0_DCU4)
  74. /**
  75. * @}
  76. */
  77. /**
  78. * @defgroup FCG_FCG1_Peripheral FCG FCG1 peripheral
  79. * @{
  80. */
  81. #define FCG1_PERIPH_MCAN1 (PWC_FCG1_MCAN1)
  82. #define FCG1_PERIPH_MCAN2 (PWC_FCG1_MCAN2)
  83. #define FCG1_PERIPH_QSPI (PWC_FCG1_QSPI)
  84. #define FCG1_PERIPH_I2C1 (PWC_FCG1_I2C1)
  85. #define FCG1_PERIPH_I2C2 (PWC_FCG1_I2C2)
  86. #define FCG1_PERIPH_SPI1 (PWC_FCG1_SPI1)
  87. #define FCG1_PERIPH_SPI2 (PWC_FCG1_SPI2)
  88. #define FCG1_PERIPH_SPI3 (PWC_FCG1_SPI3)
  89. /**
  90. * @}
  91. */
  92. /**
  93. * @defgroup FCG_FCG2_Peripheral FCG FCG2 peripheral
  94. * @{
  95. */
  96. #define FCG2_PERIPH_TMR6_1 (PWC_FCG2_TMR6_1)
  97. #define FCG2_PERIPH_TMR6_2 (PWC_FCG2_TMR6_2)
  98. #define FCG2_PERIPH_TMR4_1 (PWC_FCG2_TMR4_1)
  99. #define FCG2_PERIPH_TMR4_2 (PWC_FCG2_TMR4_2)
  100. #define FCG2_PERIPH_TMR4_3 (PWC_FCG2_TMR4_3)
  101. #define FCG2_PERIPH_TMR0_1 (PWC_FCG2_TMR0_1)
  102. #define FCG2_PERIPH_TMR0_2 (PWC_FCG2_TMR0_2)
  103. #define FCG2_PERIPH_EMB (PWC_FCG2_EMB)
  104. #define FCG2_PERIPH_TMRA_1 (PWC_FCG2_TMRA_1)
  105. #define FCG2_PERIPH_TMRA_2 (PWC_FCG2_TMRA_2)
  106. #define FCG2_PERIPH_TMRA_3 (PWC_FCG2_TMRA_3)
  107. #define FCG2_PERIPH_TMRA_4 (PWC_FCG2_TMRA_4)
  108. #define FCG2_PERIPH_TMRA_5 (PWC_FCG2_TMRA_5)
  109. /**
  110. * @}
  111. */
  112. /**
  113. * @defgroup FCG_FCG3_Peripheral FCG FCG3 peripheral
  114. * @{
  115. */
  116. #define FCG3_PERIPH_ADC1 (PWC_FCG3_ADC1)
  117. #define FCG3_PERIPH_ADC2 (PWC_FCG3_ADC2)
  118. #define FCG3_PERIPH_ADC3 (PWC_FCG3_ADC3)
  119. #define FCG3_PERIPH_DAC (PWC_FCG3_DAC)
  120. #define FCG3_PERIPH_CMP1_2 (PWC_FCG3_CMP12)
  121. #define FCG3_PERIPH_CMP3_4 (PWC_FCG3_CMP34)
  122. #define FCG3_PERIPH_SMC (PWC_FCG3_SMC)
  123. #define FCG3_PERIPH_USART1 (PWC_FCG3_USART1)
  124. #define FCG3_PERIPH_USART2 (PWC_FCG3_USART2)
  125. #define FCG3_PERIPH_USART3 (PWC_FCG3_USART3)
  126. #define FCG3_PERIPH_USART4 (PWC_FCG3_USART4)
  127. #define FCG3_PERIPH_USART5 (PWC_FCG3_USART5)
  128. #define FCG3_PERIPH_USART6 (PWC_FCG3_USART6)
  129. /**
  130. * @}
  131. */
  132. /**
  133. * @defgroup FCG_FCGx_Peripheral_Mask FCG FCGx Peripheral Mask
  134. * @{
  135. */
  136. #define FCG_FCG0_PERIPH_MASK (0x0FF7E411UL)
  137. #define FCG_FCG1_PERIPH_MASK (0x0007003BUL)
  138. #define FCG_FCG2_PERIPH_MASK (0x01F0BE03UL)
  139. #define FCG_FCG3_PERIPH_MASK (0x03F10317UL)
  140. /**
  141. * @}
  142. */
  143. /**
  144. * @}
  145. */
  146. /*******************************************************************************
  147. * Global variable definitions ('extern')
  148. ******************************************************************************/
  149. /*******************************************************************************
  150. Global function prototypes (definition in C source)
  151. ******************************************************************************/
  152. /**
  153. * @addtogroup FCG_Global_Functions
  154. * @{
  155. */
  156. void FCG_Fcg0PeriphClockCmd(uint32_t u32Fcg0Periph, en_functional_state_t enNewState);
  157. void FCG_Fcg1PeriphClockCmd(uint32_t u32Fcg1Periph, en_functional_state_t enNewState);
  158. void FCG_Fcg2PeriphClockCmd(uint32_t u32Fcg2Periph, en_functional_state_t enNewState);
  159. void FCG_Fcg3PeriphClockCmd(uint32_t u32Fcg3Periph, en_functional_state_t enNewState);
  160. /**
  161. * @}
  162. */
  163. #endif /* LL_FCG_ENABLE */
  164. /**
  165. * @}
  166. */
  167. /**
  168. * @}
  169. */
  170. #ifdef __cplusplus
  171. }
  172. #endif
  173. #endif /* __HC32_LL_FCG_H__ */
  174. /*******************************************************************************
  175. * EOF (not truncated)
  176. ******************************************************************************/