stm32h7xx_hal.h 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185
  1. /**
  2. ******************************************************************************
  3. * @file stm32h7xx_hal.h
  4. * @author MCD Application Team
  5. * @brief This file contains all the functions prototypes for the HAL
  6. * module driver.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * Copyright (c) 2017 STMicroelectronics.
  11. * All rights reserved.
  12. *
  13. * This software is licensed under terms that can be found in the LICENSE file
  14. * in the root directory of this software component.
  15. * If no LICENSE file comes with this software, it is provided AS-IS.
  16. *
  17. ******************************************************************************
  18. */
  19. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef STM32H7xx_HAL_H
  21. #define STM32H7xx_HAL_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "stm32h7xx_hal_conf.h"
  27. /** @addtogroup STM32H7xx_HAL_Driver
  28. * @{
  29. */
  30. /** @addtogroup HAL
  31. * @{
  32. */
  33. /* Exported types ------------------------------------------------------------*/
  34. /** @defgroup HAL_TICK_FREQ Tick Frequency
  35. * @{
  36. */
  37. typedef enum
  38. {
  39. HAL_TICK_FREQ_10HZ = 100U,
  40. HAL_TICK_FREQ_100HZ = 10U,
  41. HAL_TICK_FREQ_1KHZ = 1U,
  42. HAL_TICK_FREQ_DEFAULT = HAL_TICK_FREQ_1KHZ
  43. } HAL_TickFreqTypeDef;
  44. /**
  45. * @}
  46. */
  47. /* Exported constants --------------------------------------------------------*/
  48. /** @defgroup HAL_Exported_Constants HAL Exported Constants
  49. * @{
  50. */
  51. /** @defgroup REV_ID device revision ID
  52. * @{
  53. */
  54. #define REV_ID_Y ((uint32_t)0x1003) /*!< STM32H7 rev.Y */
  55. #define REV_ID_B ((uint32_t)0x2000) /*!< STM32H7 rev.B */
  56. #define REV_ID_X ((uint32_t)0x2001) /*!< STM32H7 rev.X */
  57. #define REV_ID_V ((uint32_t)0x2003) /*!< STM32H7 rev.V */
  58. /**
  59. * @}
  60. */
  61. /** @defgroup SYSCFG_Exported_Constants SYSCFG Exported Constants
  62. * @{
  63. */
  64. /** @defgroup SYSCFG_VREFBUF_VoltageScale VREFBUF Voltage Scale
  65. * @{
  66. */
  67. #define SYSCFG_VREFBUF_VOLTAGE_SCALE0 VREFBUF_CSR_VRS_OUT1 /*!< Voltage reference scale 0 (VREF_OUT1) */
  68. #define SYSCFG_VREFBUF_VOLTAGE_SCALE1 VREFBUF_CSR_VRS_OUT2 /*!< Voltage reference scale 1 (VREF_OUT2) */
  69. #define SYSCFG_VREFBUF_VOLTAGE_SCALE2 VREFBUF_CSR_VRS_OUT3 /*!< Voltage reference scale 2 (VREF_OUT3) */
  70. #define SYSCFG_VREFBUF_VOLTAGE_SCALE3 VREFBUF_CSR_VRS_OUT4 /*!< Voltage reference scale 3 (VREF_OUT4) */
  71. #define IS_SYSCFG_VREFBUF_VOLTAGE_SCALE(__SCALE__) (((__SCALE__) == SYSCFG_VREFBUF_VOLTAGE_SCALE0) || \
  72. ((__SCALE__) == SYSCFG_VREFBUF_VOLTAGE_SCALE1) || \
  73. ((__SCALE__) == SYSCFG_VREFBUF_VOLTAGE_SCALE2) || \
  74. ((__SCALE__) == SYSCFG_VREFBUF_VOLTAGE_SCALE3))
  75. /**
  76. * @}
  77. */
  78. /** @defgroup SYSCFG_VREFBUF_HighImpedance VREFBUF High Impedance
  79. * @{
  80. */
  81. #define SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE ((uint32_t)0x00000000) /*!< VREF_plus pin is internally connected to Voltage reference buffer output */
  82. #define SYSCFG_VREFBUF_HIGH_IMPEDANCE_ENABLE VREFBUF_CSR_HIZ /*!< VREF_plus pin is high impedance */
  83. #define IS_SYSCFG_VREFBUF_HIGH_IMPEDANCE(__VALUE__) (((__VALUE__) == SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE) || \
  84. ((__VALUE__) == SYSCFG_VREFBUF_HIGH_IMPEDANCE_ENABLE))
  85. #define IS_SYSCFG_VREFBUF_TRIMMING(__VALUE__) (((__VALUE__) > 0UL) && ((__VALUE__) <= VREFBUF_CCR_TRIM))
  86. /**
  87. * @}
  88. */
  89. #if !defined(SYSCFG_PMCR_BOOSTEN)
  90. /** @defgroup SYSCFG_FastModePlus_GPIO Fast-mode Plus on GPIO
  91. * @{
  92. */
  93. /** @brief Fast-mode Plus driving capability on a specific GPIO
  94. */
  95. #define SYSCFG_FASTMODEPLUS_PB6 SYSCFG_PMCR_I2C_PB6_FMP /*!< Enable Fast-mode Plus on PB6 */
  96. #define SYSCFG_FASTMODEPLUS_PB7 SYSCFG_PMCR_I2C_PB7_FMP /*!< Enable Fast-mode Plus on PB7 */
  97. #define SYSCFG_FASTMODEPLUS_PB8 SYSCFG_PMCR_I2C_PB8_FMP /*!< Enable Fast-mode Plus on PB8 */
  98. #define SYSCFG_FASTMODEPLUS_PB9 SYSCFG_PMCR_I2C_PB9_FMP /*!< Enable Fast-mode Plus on PB9 */
  99. #define IS_SYSCFG_FASTMODEPLUS(__PIN__) ((((__PIN__) & SYSCFG_FASTMODEPLUS_PB6) == SYSCFG_FASTMODEPLUS_PB6) || \
  100. (((__PIN__) & SYSCFG_FASTMODEPLUS_PB7) == SYSCFG_FASTMODEPLUS_PB7) || \
  101. (((__PIN__) & SYSCFG_FASTMODEPLUS_PB8) == SYSCFG_FASTMODEPLUS_PB8) || \
  102. (((__PIN__) & SYSCFG_FASTMODEPLUS_PB9) == SYSCFG_FASTMODEPLUS_PB9))
  103. /**
  104. * @}
  105. */
  106. #endif /* ! SYSCFG_PMCR_BOOSTEN */
  107. #if defined(SYSCFG_ADC2ALT_ADC2_ROUT0) || defined(SYSCFG_ADC2ALT_ADC2_ROUT1)
  108. /** @defgroup SYSCFG_Adc2_Alternate_Connection SYSCFG ADC2 Alternate Connection
  109. * @{
  110. */
  111. /** @brief Adc2 Alternate Connection on Vinp[16] and Vinp[17]
  112. */
  113. #define SYSCFG_ADC2_ROUT0_DAC1_1 ((uint32_t)0x00000000) /*!< DAC1_out1 connected to ADC2 VINP[16] */
  114. #define SYSCFG_ADC2_ROUT0_VBAT4 SYSCFG_ADC2ALT_ADC2_ROUT0 /*!< VBAT/4 connected to ADC2 VINP[16] */
  115. #define SYSCFG_ADC2_ROUT1_DAC1_2 ((uint32_t)0x00000000) /*!< DAC1_out2 connected to ADC2 VINP[17] */
  116. #define SYSCFG_ADC2_ROUT1_VREFINT SYSCFG_ADC2ALT_ADC2_ROUT1 /*!< VREFINT connected to ADC2 VINP[17] */
  117. #define IS_SYSCFG_ADC2ALT_ROUT0(__VALUE__) (((__VALUE__) == SYSCFG_ADC2_ROUT0_DAC1_1) || \
  118. ((__VALUE__) == SYSCFG_ADC2_ROUT0_VBAT4))
  119. #define IS_SYSCFG_ADC2ALT_ROUT1(__VALUE__) (((__VALUE__) == SYSCFG_ADC2_ROUT1_DAC1_2) || \
  120. ((__VALUE__) == SYSCFG_ADC2_ROUT1_VREFINT))
  121. /**
  122. * @}
  123. */
  124. #endif /*SYSCFG_ADC2ALT_ADC2_ROUT0 || SYSCFG_ADC2ALT_ADC2_ROUT1*/
  125. /** @defgroup SYSCFG_Ethernet_Config Ethernet Config
  126. * @{
  127. */
  128. #define SYSCFG_ETH_MII ((uint32_t)0x00000000) /*!< Select the Media Independent Interface */
  129. #define SYSCFG_ETH_RMII SYSCFG_PMCR_EPIS_SEL_2 /*!< Select the Reduced Media Independent Interface */
  130. #define IS_SYSCFG_ETHERNET_CONFIG(CONFIG) (((CONFIG) == SYSCFG_ETH_MII) || \
  131. ((CONFIG) == SYSCFG_ETH_RMII))
  132. /**
  133. * @}
  134. */
  135. /** @defgroup SYSCFG_Analog_Switch_Config Analog Switch Config
  136. * @{
  137. */
  138. #define SYSCFG_SWITCH_PA0 SYSCFG_PMCR_PA0SO /*!< Select PA0 analog switch */
  139. #define SYSCFG_SWITCH_PA1 SYSCFG_PMCR_PA1SO /*!< Select PA1 analog switch */
  140. #define SYSCFG_SWITCH_PC2 SYSCFG_PMCR_PC2SO /*!< Select PC2 analog switch */
  141. #define SYSCFG_SWITCH_PC3 SYSCFG_PMCR_PC3SO /*!< Select PC3 analog switch */
  142. #define SYSCFG_SWITCH_PA0_OPEN SYSCFG_PMCR_PA0SO /*!< PA0 analog switch opened */
  143. #define SYSCFG_SWITCH_PA0_CLOSE ((uint32_t)0x00000000) /*!< PA0 analog switch closed */
  144. #define SYSCFG_SWITCH_PA1_OPEN SYSCFG_PMCR_PA1SO /*!< PA1 analog switch opened */
  145. #define SYSCFG_SWITCH_PA1_CLOSE ((uint32_t)0x00000000) /*!< PA1 analog switch closed*/
  146. #define SYSCFG_SWITCH_PC2_OPEN SYSCFG_PMCR_PC2SO /*!< PC2 analog switch opened */
  147. #define SYSCFG_SWITCH_PC2_CLOSE ((uint32_t)0x00000000) /*!< PC2 analog switch closed */
  148. #define SYSCFG_SWITCH_PC3_OPEN SYSCFG_PMCR_PC3SO /*!< PC3 analog switch opened */
  149. #define SYSCFG_SWITCH_PC3_CLOSE ((uint32_t)0x00000000) /*!< PC3 analog switch closed */
  150. /**
  151. * @}
  152. */
  153. #define IS_SYSCFG_ANALOG_SWITCH(SWITCH) ((((SWITCH) & SYSCFG_SWITCH_PA0) == SYSCFG_SWITCH_PA0)|| \
  154. (((SWITCH) & SYSCFG_SWITCH_PA1) == SYSCFG_SWITCH_PA1) || \
  155. (((SWITCH) & SYSCFG_SWITCH_PC2) == SYSCFG_SWITCH_PC2) || \
  156. (((SWITCH) & SYSCFG_SWITCH_PC3) == SYSCFG_SWITCH_PC3))
  157. #define IS_SYSCFG_SWITCH_STATE(STATE) ((((STATE) & SYSCFG_SWITCH_PA0_OPEN) == SYSCFG_SWITCH_PA0_OPEN) || \
  158. (((STATE) & SYSCFG_SWITCH_PA0_CLOSE) == SYSCFG_SWITCH_PA0_CLOSE) || \
  159. (((STATE) & SYSCFG_SWITCH_PA1_OPEN) == SYSCFG_SWITCH_PA1_OPEN) || \
  160. (((STATE) & SYSCFG_SWITCH_PA1_CLOSE) == SYSCFG_SWITCH_PA1_CLOSE) || \
  161. (((STATE) & SYSCFG_SWITCH_PC2_OPEN) == SYSCFG_SWITCH_PC2_OPEN) || \
  162. (((STATE) & SYSCFG_SWITCH_PC2_CLOSE) == SYSCFG_SWITCH_PC2_CLOSE) || \
  163. (((STATE) & SYSCFG_SWITCH_PC3_OPEN) == SYSCFG_SWITCH_PC3_OPEN) || \
  164. (((STATE) & SYSCFG_SWITCH_PC3_CLOSE) == SYSCFG_SWITCH_PC3_CLOSE))
  165. /** @defgroup SYSCFG_Boot_Config Boot Config
  166. * @{
  167. */
  168. #define SYSCFG_BOOT_ADDR0 ((uint32_t)0x00000000) /*!< Select Boot address0 */
  169. #define SYSCFG_BOOT_ADDR1 ((uint32_t)0x00000001) /*!< Select Boot address1 */
  170. #define IS_SYSCFG_BOOT_REGISTER(REGISTER) (((REGISTER) == SYSCFG_BOOT_ADDR0)|| \
  171. ((REGISTER) == SYSCFG_BOOT_ADDR1))
  172. #define IS_SYSCFG_BOOT_ADDRESS(ADDRESS) ((ADDRESS) < PERIPH_BASE)
  173. /**
  174. * @}
  175. */
  176. /** @defgroup SYSCFG_IOCompenstionCell_Config IOCompenstionCell Config
  177. * @{
  178. */
  179. #define SYSCFG_CELL_CODE ((uint32_t)0x00000000) /*!< Select Code from the cell */
  180. #define SYSCFG_REGISTER_CODE SYSCFG_CCCSR_CS /*!< Code from the SYSCFG compensation cell code register */
  181. #define IS_SYSCFG_CODE_SELECT(SELECT) (((SELECT) == SYSCFG_CELL_CODE)|| \
  182. ((SELECT) == SYSCFG_REGISTER_CODE))
  183. #define IS_SYSCFG_CODE_CONFIG(CONFIG) ((CONFIG) < (0x10UL))
  184. /**
  185. * @}
  186. */
  187. /**
  188. * @}
  189. */
  190. /** @defgroup EXTI_Event_Input_Config Event Input Config
  191. * @{
  192. */
  193. #define EXTI_MODE_IT ((uint32_t)0x00010000)
  194. #define EXTI_MODE_EVT ((uint32_t)0x00020000)
  195. #define EXTI_RISING_EDGE ((uint32_t)0x00100000)
  196. #define EXTI_FALLING_EDGE ((uint32_t)0x00200000)
  197. #define IS_EXTI_EDGE_LINE(EDGE) (((EDGE) == EXTI_RISING_EDGE) || ((EDGE) == EXTI_FALLING_EDGE))
  198. #define IS_EXTI_MODE_LINE(MODE) (((MODE) == EXTI_MODE_IT) || ((MODE) == EXTI_MODE_EVT))
  199. #define EXTI_LINE0 ((uint32_t)0x00) /*!< External interrupt LINE 0 */
  200. #define EXTI_LINE1 ((uint32_t)0x01) /*!< External interrupt LINE 1 */
  201. #define EXTI_LINE2 ((uint32_t)0x02) /*!< External interrupt LINE 2 */
  202. #define EXTI_LINE3 ((uint32_t)0x03) /*!< External interrupt LINE 3 */
  203. #define EXTI_LINE4 ((uint32_t)0x04) /*!< External interrupt LINE 4 */
  204. #define EXTI_LINE5 ((uint32_t)0x05) /*!< External interrupt LINE 5 */
  205. #define EXTI_LINE6 ((uint32_t)0x06) /*!< External interrupt LINE 6 */
  206. #define EXTI_LINE7 ((uint32_t)0x07) /*!< External interrupt LINE 7 */
  207. #define EXTI_LINE8 ((uint32_t)0x08) /*!< External interrupt LINE 8 */
  208. #define EXTI_LINE9 ((uint32_t)0x09) /*!< External interrupt LINE 9 */
  209. #define EXTI_LINE10 ((uint32_t)0x0A) /*!< External interrupt LINE 10 */
  210. #define EXTI_LINE11 ((uint32_t)0x0B) /*!< External interrupt LINE 11 */
  211. #define EXTI_LINE12 ((uint32_t)0x0C) /*!< External interrupt LINE 12 */
  212. #define EXTI_LINE13 ((uint32_t)0x0D) /*!< External interrupt LINE 13 */
  213. #define EXTI_LINE14 ((uint32_t)0x0E) /*!< External interrupt LINE 14 */
  214. #define EXTI_LINE15 ((uint32_t)0x0F) /*!< External interrupt LINE 15 */
  215. #define EXTI_LINE16 ((uint32_t)0x10)
  216. #define EXTI_LINE17 ((uint32_t)0x11)
  217. #define EXTI_LINE18 ((uint32_t)0x12)
  218. #define EXTI_LINE19 ((uint32_t)0x13)
  219. #define EXTI_LINE20 ((uint32_t)0x14)
  220. #define EXTI_LINE21 ((uint32_t)0x15)
  221. #define EXTI_LINE22 ((uint32_t)0x16)
  222. #define EXTI_LINE23 ((uint32_t)0x17)
  223. #define EXTI_LINE24 ((uint32_t)0x18)
  224. #define EXTI_LINE25 ((uint32_t)0x19)
  225. #define EXTI_LINE26 ((uint32_t)0x1A)
  226. #define EXTI_LINE27 ((uint32_t)0x1B)
  227. #define EXTI_LINE28 ((uint32_t)0x1C)
  228. #define EXTI_LINE29 ((uint32_t)0x1D)
  229. #define EXTI_LINE30 ((uint32_t)0x1E)
  230. #define EXTI_LINE31 ((uint32_t)0x1F)
  231. #define EXTI_LINE32 ((uint32_t)0x20)
  232. #define EXTI_LINE33 ((uint32_t)0x21)
  233. #define EXTI_LINE34 ((uint32_t)0x22)
  234. #define EXTI_LINE35 ((uint32_t)0x23)
  235. #define EXTI_LINE36 ((uint32_t)0x24)
  236. #define EXTI_LINE37 ((uint32_t)0x25)
  237. #define EXTI_LINE38 ((uint32_t)0x26)
  238. #define EXTI_LINE39 ((uint32_t)0x27)
  239. #define EXTI_LINE40 ((uint32_t)0x28)
  240. #define EXTI_LINE41 ((uint32_t)0x29)
  241. #define EXTI_LINE42 ((uint32_t)0x2A)
  242. #define EXTI_LINE43 ((uint32_t)0x2B)
  243. #define EXTI_LINE44 ((uint32_t)0x2C) /* Not available in all family lines */
  244. /* EXTI_LINE45 Reserved */
  245. #if defined(DUAL_CORE)
  246. #define EXTI_LINE46 ((uint32_t)0x2E)
  247. #else
  248. /* EXTI_LINE46 Reserved */
  249. #endif /* DUAL_CORE */
  250. #define EXTI_LINE47 ((uint32_t)0x2F)
  251. #define EXTI_LINE48 ((uint32_t)0x30)
  252. #define EXTI_LINE49 ((uint32_t)0x31)
  253. #define EXTI_LINE50 ((uint32_t)0x32)
  254. #define EXTI_LINE51 ((uint32_t)0x33)
  255. #define EXTI_LINE52 ((uint32_t)0x34)
  256. #define EXTI_LINE53 ((uint32_t)0x35)
  257. #define EXTI_LINE54 ((uint32_t)0x36)
  258. #define EXTI_LINE55 ((uint32_t)0x37)
  259. #define EXTI_LINE56 ((uint32_t)0x38)
  260. #define EXTI_LINE57 ((uint32_t)0x39)
  261. #define EXTI_LINE58 ((uint32_t)0x3A)
  262. #define EXTI_LINE59 ((uint32_t)0x3B)
  263. #define EXTI_LINE60 ((uint32_t)0x3C)
  264. #define EXTI_LINE61 ((uint32_t)0x3D)
  265. #define EXTI_LINE62 ((uint32_t)0x3E)
  266. #define EXTI_LINE63 ((uint32_t)0x3F)
  267. #define EXTI_LINE64 ((uint32_t)0x40)
  268. #define EXTI_LINE65 ((uint32_t)0x41)
  269. #define EXTI_LINE66 ((uint32_t)0x42)
  270. #define EXTI_LINE67 ((uint32_t)0x43)
  271. #define EXTI_LINE68 ((uint32_t)0x44)
  272. #define EXTI_LINE69 ((uint32_t)0x45)
  273. #define EXTI_LINE70 ((uint32_t)0x46)
  274. #define EXTI_LINE71 ((uint32_t)0x47)
  275. #define EXTI_LINE72 ((uint32_t)0x48)
  276. #define EXTI_LINE73 ((uint32_t)0x49)
  277. #define EXTI_LINE74 ((uint32_t)0x4A)
  278. #define EXTI_LINE75 ((uint32_t)0x4B) /* Not available in all family lines */
  279. #define EXTI_LINE76 ((uint32_t)0x4C) /* Not available in all family lines */
  280. #if defined(DUAL_CORE)
  281. #define EXTI_LINE77 ((uint32_t)0x4D)
  282. #define EXTI_LINE78 ((uint32_t)0x4E)
  283. #define EXTI_LINE79 ((uint32_t)0x4F)
  284. #define EXTI_LINE80 ((uint32_t)0x50)
  285. #else
  286. /* EXTI_LINE77 Reserved */
  287. /* EXTI_LINE78 Reserved */
  288. /* EXTI_LINE79 Reserved */
  289. /* EXTI_LINE80 Reserved */
  290. #endif /* DUAL_CORE */
  291. /* EXTI_LINE81 Reserved */
  292. #if defined(DUAL_CORE)
  293. #define EXTI_LINE82 ((uint32_t)0x52)
  294. #else
  295. /* EXTI_LINE82 Reserved */
  296. #endif /* DUAL_CORE */
  297. /* EXTI_LINE83 Reserved */
  298. #if defined(DUAL_CORE)
  299. #define EXTI_LINE84 ((uint32_t)0x54)
  300. #else
  301. /* EXTI_LINE84 Reserved */
  302. #endif /* DUAL_CORE */
  303. #define EXTI_LINE85 ((uint32_t)0x55)
  304. #define EXTI_LINE86 ((uint32_t)0x56) /* Not available in all family lines */
  305. #define EXTI_LINE87 ((uint32_t)0x57)
  306. #define EXTI_LINE88 ((uint32_t)0x58) /* Not available in all family lines */
  307. #define EXTI_LINE89 ((uint32_t)0x59) /* Not available in all family lines */
  308. #define EXTI_LINE90 ((uint32_t)0x5A) /* Not available in all family lines */
  309. #define EXTI_LINE91 ((uint32_t)0x5B) /* Not available in all family lines */
  310. #if defined(DUAL_CORE)
  311. #define IS_HAL_EXTI_CONFIG_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \
  312. ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \
  313. ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \
  314. ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \
  315. ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \
  316. ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \
  317. ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \
  318. ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \
  319. ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \
  320. ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \
  321. ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \
  322. ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE51) || \
  323. ((LINE) == EXTI_LINE82) || ((LINE) == EXTI_LINE84) || \
  324. ((LINE) == EXTI_LINE85) || ((LINE) == EXTI_LINE86))
  325. #else
  326. #define IS_HAL_EXTI_CONFIG_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1)|| \
  327. ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \
  328. ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \
  329. ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \
  330. ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \
  331. ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \
  332. ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \
  333. ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \
  334. ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \
  335. ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \
  336. ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \
  337. ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE51) || \
  338. ((LINE) == EXTI_LINE85) || ((LINE) == EXTI_LINE86))
  339. #endif /* DUAL_CORE */
  340. #if defined(DUAL_CORE)
  341. #define IS_EXTI_ALL_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \
  342. ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \
  343. ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \
  344. ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \
  345. ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \
  346. ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \
  347. ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \
  348. ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \
  349. ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \
  350. ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \
  351. ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \
  352. ((LINE) == EXTI_LINE22) || ((LINE) == EXTI_LINE23) || \
  353. ((LINE) == EXTI_LINE24) || ((LINE) == EXTI_LINE25) || \
  354. ((LINE) == EXTI_LINE26) || ((LINE) == EXTI_LINE27) || \
  355. ((LINE) == EXTI_LINE28) || ((LINE) == EXTI_LINE29) || \
  356. ((LINE) == EXTI_LINE30) || ((LINE) == EXTI_LINE31) || \
  357. ((LINE) == EXTI_LINE32) || ((LINE) == EXTI_LINE33) || \
  358. ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \
  359. ((LINE) == EXTI_LINE36) || ((LINE) == EXTI_LINE37) || \
  360. ((LINE) == EXTI_LINE38) || ((LINE) == EXTI_LINE39) || \
  361. ((LINE) == EXTI_LINE40) || ((LINE) == EXTI_LINE41) || \
  362. ((LINE) == EXTI_LINE42) || ((LINE) == EXTI_LINE43) || \
  363. ((LINE) == EXTI_LINE44) || ((LINE) == EXTI_LINE46) || \
  364. ((LINE) == EXTI_LINE47) || ((LINE) == EXTI_LINE48) || \
  365. ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \
  366. ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE52) || \
  367. ((LINE) == EXTI_LINE53) || ((LINE) == EXTI_LINE54) || \
  368. ((LINE) == EXTI_LINE55) || ((LINE) == EXTI_LINE56) || \
  369. ((LINE) == EXTI_LINE57) || ((LINE) == EXTI_LINE58) || \
  370. ((LINE) == EXTI_LINE59) || ((LINE) == EXTI_LINE60) || \
  371. ((LINE) == EXTI_LINE61) || ((LINE) == EXTI_LINE62) || \
  372. ((LINE) == EXTI_LINE63) || ((LINE) == EXTI_LINE64) || \
  373. ((LINE) == EXTI_LINE65) || ((LINE) == EXTI_LINE66) || \
  374. ((LINE) == EXTI_LINE67) || ((LINE) == EXTI_LINE68) || \
  375. ((LINE) == EXTI_LINE69) || ((LINE) == EXTI_LINE70) || \
  376. ((LINE) == EXTI_LINE71) || ((LINE) == EXTI_LINE72) || \
  377. ((LINE) == EXTI_LINE73) || ((LINE) == EXTI_LINE74) || \
  378. ((LINE) == EXTI_LINE75) || ((LINE) == EXTI_LINE76) || \
  379. ((LINE) == EXTI_LINE77) || ((LINE) == EXTI_LINE79) || \
  380. ((LINE) == EXTI_LINE84) || ((LINE) == EXTI_LINE85) || \
  381. ((LINE) == EXTI_LINE86) || ((LINE) == EXTI_LINE87) || \
  382. ((LINE) == EXTI_LINE78) || \
  383. ((LINE) == EXTI_LINE80) || ((LINE) == EXTI_LINE82))
  384. #else
  385. #define IS_EXTI_ALL_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \
  386. ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \
  387. ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \
  388. ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \
  389. ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \
  390. ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \
  391. ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \
  392. ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \
  393. ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \
  394. ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \
  395. ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \
  396. ((LINE) == EXTI_LINE22) || ((LINE) == EXTI_LINE23) || \
  397. ((LINE) == EXTI_LINE24) || ((LINE) == EXTI_LINE25) || \
  398. ((LINE) == EXTI_LINE26) || ((LINE) == EXTI_LINE27) || \
  399. ((LINE) == EXTI_LINE28) || ((LINE) == EXTI_LINE29) || \
  400. ((LINE) == EXTI_LINE30) || ((LINE) == EXTI_LINE31) || \
  401. ((LINE) == EXTI_LINE32) || ((LINE) == EXTI_LINE33) || \
  402. ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \
  403. ((LINE) == EXTI_LINE36) || ((LINE) == EXTI_LINE37) || \
  404. ((LINE) == EXTI_LINE38) || ((LINE) == EXTI_LINE39) || \
  405. ((LINE) == EXTI_LINE40) || ((LINE) == EXTI_LINE41) || \
  406. ((LINE) == EXTI_LINE42) || ((LINE) == EXTI_LINE43) || \
  407. ((LINE) == EXTI_LINE44) || \
  408. ((LINE) == EXTI_LINE47) || ((LINE) == EXTI_LINE48) || \
  409. ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \
  410. ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE52) || \
  411. ((LINE) == EXTI_LINE53) || ((LINE) == EXTI_LINE54) || \
  412. ((LINE) == EXTI_LINE55) || ((LINE) == EXTI_LINE56) || \
  413. ((LINE) == EXTI_LINE57) || ((LINE) == EXTI_LINE58) || \
  414. ((LINE) == EXTI_LINE59) || ((LINE) == EXTI_LINE60) || \
  415. ((LINE) == EXTI_LINE61) || ((LINE) == EXTI_LINE62) || \
  416. ((LINE) == EXTI_LINE63) || ((LINE) == EXTI_LINE64) || \
  417. ((LINE) == EXTI_LINE65) || ((LINE) == EXTI_LINE66) || \
  418. ((LINE) == EXTI_LINE67) || ((LINE) == EXTI_LINE68) || \
  419. ((LINE) == EXTI_LINE69) || ((LINE) == EXTI_LINE70) || \
  420. ((LINE) == EXTI_LINE71) || ((LINE) == EXTI_LINE72) || \
  421. ((LINE) == EXTI_LINE73) || ((LINE) == EXTI_LINE74) || \
  422. ((LINE) == EXTI_LINE75) || ((LINE) == EXTI_LINE76) || \
  423. ((LINE) == EXTI_LINE85) || \
  424. ((LINE) == EXTI_LINE86) || ((LINE) == EXTI_LINE87) || \
  425. ((LINE) == EXTI_LINE88) || ((LINE) == EXTI_LINE89) || \
  426. ((LINE) == EXTI_LINE90) || ((LINE) == EXTI_LINE91))
  427. #endif /*DUAL_CORE*/
  428. #if defined(DUAL_CORE)
  429. #define IS_EXTI_D1_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \
  430. ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \
  431. ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \
  432. ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \
  433. ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \
  434. ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \
  435. ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \
  436. ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \
  437. ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \
  438. ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \
  439. ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \
  440. ((LINE) == EXTI_LINE22) || ((LINE) == EXTI_LINE23) || \
  441. ((LINE) == EXTI_LINE24) || ((LINE) == EXTI_LINE25) || \
  442. ((LINE) == EXTI_LINE26) || ((LINE) == EXTI_LINE27) || \
  443. ((LINE) == EXTI_LINE28) || ((LINE) == EXTI_LINE29) || \
  444. ((LINE) == EXTI_LINE30) || ((LINE) == EXTI_LINE31) || \
  445. ((LINE) == EXTI_LINE32) || ((LINE) == EXTI_LINE33) || \
  446. ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \
  447. ((LINE) == EXTI_LINE36) || ((LINE) == EXTI_LINE37) || \
  448. ((LINE) == EXTI_LINE38) || ((LINE) == EXTI_LINE39) || \
  449. ((LINE) == EXTI_LINE40) || ((LINE) == EXTI_LINE41) || \
  450. ((LINE) == EXTI_LINE42) || ((LINE) == EXTI_LINE43) || \
  451. ((LINE) == EXTI_LINE44) || ((LINE) == EXTI_LINE46) || \
  452. ((LINE) == EXTI_LINE47) || ((LINE) == EXTI_LINE48) || \
  453. ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \
  454. ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE52) || \
  455. ((LINE) == EXTI_LINE53) || ((LINE) == EXTI_LINE54) || \
  456. ((LINE) == EXTI_LINE55) || ((LINE) == EXTI_LINE56) || \
  457. ((LINE) == EXTI_LINE57) || ((LINE) == EXTI_LINE58) || \
  458. ((LINE) == EXTI_LINE59) || ((LINE) == EXTI_LINE60) || \
  459. ((LINE) == EXTI_LINE61) || ((LINE) == EXTI_LINE62) || \
  460. ((LINE) == EXTI_LINE63) || ((LINE) == EXTI_LINE64) || \
  461. ((LINE) == EXTI_LINE65) || ((LINE) == EXTI_LINE66) || \
  462. ((LINE) == EXTI_LINE67) || ((LINE) == EXTI_LINE68) || \
  463. ((LINE) == EXTI_LINE69) || ((LINE) == EXTI_LINE70) || \
  464. ((LINE) == EXTI_LINE71) || ((LINE) == EXTI_LINE72) || \
  465. ((LINE) == EXTI_LINE73) || ((LINE) == EXTI_LINE74) || \
  466. ((LINE) == EXTI_LINE75) || ((LINE) == EXTI_LINE76) || \
  467. ((LINE) == EXTI_LINE77) || ((LINE) == EXTI_LINE79) || \
  468. ((LINE) == EXTI_LINE84) || ((LINE) == EXTI_LINE85) || \
  469. ((LINE) == EXTI_LINE86) || ((LINE) == EXTI_LINE87))
  470. #else
  471. #define IS_EXTI_D1_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \
  472. ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \
  473. ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \
  474. ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \
  475. ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \
  476. ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \
  477. ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \
  478. ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \
  479. ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \
  480. ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \
  481. ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \
  482. ((LINE) == EXTI_LINE22) || ((LINE) == EXTI_LINE23) || \
  483. ((LINE) == EXTI_LINE24) || ((LINE) == EXTI_LINE25) || \
  484. ((LINE) == EXTI_LINE26) || ((LINE) == EXTI_LINE27) || \
  485. ((LINE) == EXTI_LINE28) || ((LINE) == EXTI_LINE29) || \
  486. ((LINE) == EXTI_LINE30) || ((LINE) == EXTI_LINE31) || \
  487. ((LINE) == EXTI_LINE32) || ((LINE) == EXTI_LINE33) || \
  488. ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \
  489. ((LINE) == EXTI_LINE36) || ((LINE) == EXTI_LINE37) || \
  490. ((LINE) == EXTI_LINE38) || ((LINE) == EXTI_LINE39) || \
  491. ((LINE) == EXTI_LINE40) || ((LINE) == EXTI_LINE41) || \
  492. ((LINE) == EXTI_LINE42) || ((LINE) == EXTI_LINE43) || \
  493. ((LINE) == EXTI_LINE44) || \
  494. ((LINE) == EXTI_LINE47) || ((LINE) == EXTI_LINE48) || \
  495. ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \
  496. ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE52) || \
  497. ((LINE) == EXTI_LINE53) || ((LINE) == EXTI_LINE54) || \
  498. ((LINE) == EXTI_LINE55) || ((LINE) == EXTI_LINE56) || \
  499. ((LINE) == EXTI_LINE57) || ((LINE) == EXTI_LINE58) || \
  500. ((LINE) == EXTI_LINE59) || ((LINE) == EXTI_LINE60) || \
  501. ((LINE) == EXTI_LINE61) || ((LINE) == EXTI_LINE62) || \
  502. ((LINE) == EXTI_LINE63) || ((LINE) == EXTI_LINE64) || \
  503. ((LINE) == EXTI_LINE65) || ((LINE) == EXTI_LINE66) || \
  504. ((LINE) == EXTI_LINE67) || ((LINE) == EXTI_LINE68) || \
  505. ((LINE) == EXTI_LINE69) || ((LINE) == EXTI_LINE70) || \
  506. ((LINE) == EXTI_LINE71) || ((LINE) == EXTI_LINE72) || \
  507. ((LINE) == EXTI_LINE73) || ((LINE) == EXTI_LINE74) || \
  508. ((LINE) == EXTI_LINE75) || ((LINE) == EXTI_LINE76) || \
  509. ((LINE) == EXTI_LINE85) || \
  510. ((LINE) == EXTI_LINE86) || ((LINE) == EXTI_LINE87) || \
  511. ((LINE) == EXTI_LINE88) || ((LINE) == EXTI_LINE89) || \
  512. ((LINE) == EXTI_LINE90) || ((LINE) == EXTI_LINE91))
  513. #endif /*DUAL_CORE*/
  514. #if defined(DUAL_CORE)
  515. #define IS_EXTI_D2_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \
  516. ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \
  517. ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \
  518. ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \
  519. ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \
  520. ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \
  521. ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \
  522. ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \
  523. ((LINE) == EXTI_LINE16) || ((LINE) == EXTI_LINE17) || \
  524. ((LINE) == EXTI_LINE18) || ((LINE) == EXTI_LINE19) || \
  525. ((LINE) == EXTI_LINE20) || ((LINE) == EXTI_LINE21) || \
  526. ((LINE) == EXTI_LINE22) || ((LINE) == EXTI_LINE23) || \
  527. ((LINE) == EXTI_LINE24) || ((LINE) == EXTI_LINE25) || \
  528. ((LINE) == EXTI_LINE26) || ((LINE) == EXTI_LINE27) || \
  529. ((LINE) == EXTI_LINE28) || ((LINE) == EXTI_LINE29) || \
  530. ((LINE) == EXTI_LINE30) || ((LINE) == EXTI_LINE31) || \
  531. ((LINE) == EXTI_LINE32) || ((LINE) == EXTI_LINE33) || \
  532. ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \
  533. ((LINE) == EXTI_LINE36) || ((LINE) == EXTI_LINE37) || \
  534. ((LINE) == EXTI_LINE38) || ((LINE) == EXTI_LINE39) || \
  535. ((LINE) == EXTI_LINE40) || ((LINE) == EXTI_LINE41) || \
  536. ((LINE) == EXTI_LINE42) || ((LINE) == EXTI_LINE43) || \
  537. ((LINE) == EXTI_LINE44) || ((LINE) == EXTI_LINE46) || \
  538. ((LINE) == EXTI_LINE47) || ((LINE) == EXTI_LINE48) || \
  539. ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \
  540. ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE52) || \
  541. ((LINE) == EXTI_LINE53) || ((LINE) == EXTI_LINE54) || \
  542. ((LINE) == EXTI_LINE55) || ((LINE) == EXTI_LINE56) || \
  543. ((LINE) == EXTI_LINE57) || ((LINE) == EXTI_LINE58) || \
  544. ((LINE) == EXTI_LINE59) || ((LINE) == EXTI_LINE60) || \
  545. ((LINE) == EXTI_LINE61) || ((LINE) == EXTI_LINE62) || \
  546. ((LINE) == EXTI_LINE63) || ((LINE) == EXTI_LINE64) || \
  547. ((LINE) == EXTI_LINE65) || ((LINE) == EXTI_LINE66) || \
  548. ((LINE) == EXTI_LINE67) || ((LINE) == EXTI_LINE68) || \
  549. ((LINE) == EXTI_LINE69) || ((LINE) == EXTI_LINE70) || \
  550. ((LINE) == EXTI_LINE71) || ((LINE) == EXTI_LINE72) || \
  551. ((LINE) == EXTI_LINE73) || ((LINE) == EXTI_LINE74) || \
  552. ((LINE) == EXTI_LINE75) || ((LINE) == EXTI_LINE76) || \
  553. ((LINE) == EXTI_LINE78) || ((LINE) == EXTI_LINE80) || \
  554. ((LINE) == EXTI_LINE82) || ((LINE) == EXTI_LINE85) || \
  555. ((LINE) == EXTI_LINE86) || ((LINE) == EXTI_LINE87))
  556. #endif /*DUAL_CORE*/
  557. #if defined(DUAL_CORE)
  558. #define IS_EXTI_D3_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \
  559. ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \
  560. ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \
  561. ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \
  562. ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \
  563. ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \
  564. ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \
  565. ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \
  566. ((LINE) == EXTI_LINE19) || ((LINE) == EXTI_LINE20) || \
  567. ((LINE) == EXTI_LINE21) || ((LINE) == EXTI_LINE25) || \
  568. ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \
  569. ((LINE) == EXTI_LINE41) || ((LINE) == EXTI_LINE48) || \
  570. ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \
  571. ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE52) || \
  572. ((LINE) == EXTI_LINE53))
  573. #elif (POWER_DOMAINS_NUMBER == 3U)
  574. #define IS_EXTI_D3_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \
  575. ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \
  576. ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \
  577. ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \
  578. ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \
  579. ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \
  580. ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \
  581. ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \
  582. ((LINE) == EXTI_LINE19) || ((LINE) == EXTI_LINE20) || \
  583. ((LINE) == EXTI_LINE21) || ((LINE) == EXTI_LINE25) || \
  584. ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \
  585. ((LINE) == EXTI_LINE41) || ((LINE) == EXTI_LINE48) || \
  586. ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \
  587. ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE52) || \
  588. ((LINE) == EXTI_LINE53) || ((LINE) == EXTI_LINE88))
  589. #else
  590. #define IS_EXTI_D3_LINE(LINE) (((LINE) == EXTI_LINE0) || ((LINE) == EXTI_LINE1) || \
  591. ((LINE) == EXTI_LINE2) || ((LINE) == EXTI_LINE3) || \
  592. ((LINE) == EXTI_LINE4) || ((LINE) == EXTI_LINE5) || \
  593. ((LINE) == EXTI_LINE6) || ((LINE) == EXTI_LINE7) || \
  594. ((LINE) == EXTI_LINE8) || ((LINE) == EXTI_LINE9) || \
  595. ((LINE) == EXTI_LINE10) || ((LINE) == EXTI_LINE11) || \
  596. ((LINE) == EXTI_LINE12) || ((LINE) == EXTI_LINE13) || \
  597. ((LINE) == EXTI_LINE14) || ((LINE) == EXTI_LINE15) || \
  598. ((LINE) == EXTI_LINE19) || ((LINE) == EXTI_LINE20) || \
  599. ((LINE) == EXTI_LINE21) || ((LINE) == EXTI_LINE25) || \
  600. ((LINE) == EXTI_LINE34) || ((LINE) == EXTI_LINE35) || \
  601. ((LINE) == EXTI_LINE41) || ((LINE) == EXTI_LINE48) || \
  602. ((LINE) == EXTI_LINE49) || ((LINE) == EXTI_LINE50) || \
  603. ((LINE) == EXTI_LINE51) || ((LINE) == EXTI_LINE88))
  604. #endif /*DUAL_CORE*/
  605. #define BDMA_CH6_CLEAR ((uint32_t)0x00000000) /*!< BDMA ch6 event selected as D3 domain pendclear source*/
  606. #define BDMA_CH7_CLEAR ((uint32_t)0x00000001) /*!< BDMA ch7 event selected as D3 domain pendclear source*/
  607. #if defined (LPTIM4)
  608. #define LPTIM4_OUT_CLEAR ((uint32_t)0x00000002) /*!< LPTIM4 out selected as D3 domain pendclear source*/
  609. #else
  610. #define LPTIM2_OUT_CLEAR ((uint32_t)0x00000002) /*!< LPTIM2 out selected as D3 domain pendclear source*/
  611. #endif /* LPTIM4 */
  612. #if defined (LPTIM5)
  613. #define LPTIM5_OUT_CLEAR ((uint32_t)0x00000003) /*!< LPTIM5 out selected as D3 domain pendclear source*/
  614. #else
  615. #define LPTIM3_OUT_CLEAR ((uint32_t)0x00000003) /*!< LPTIM3 out selected as D3 domain pendclear source*/
  616. #endif /* LPTIM5 */
  617. #if defined (LPTIM4) && defined (LPTIM5)
  618. #define IS_EXTI_D3_CLEAR(SOURCE) (((SOURCE) == BDMA_CH6_CLEAR) || ((SOURCE) == BDMA_CH7_CLEAR) || \
  619. ((SOURCE) == LPTIM4_OUT_CLEAR) || ((SOURCE) == LPTIM5_OUT_CLEAR))
  620. #else
  621. #define IS_EXTI_D3_CLEAR(SOURCE) (((SOURCE) == BDMA_CH6_CLEAR) || ((SOURCE) == BDMA_CH7_CLEAR) || \
  622. ((SOURCE) == LPTIM2_OUT_CLEAR) || ((SOURCE) == LPTIM3_OUT_CLEAR))
  623. #endif /* LPTIM4 LPTIM5 */
  624. /**
  625. * @}
  626. */
  627. /** @defgroup FMC_SwapBankMapping_Config SwapBankMapping Config
  628. * @{
  629. */
  630. #define FMC_SWAPBMAP_DISABLE (0x00000000U)
  631. #define FMC_SWAPBMAP_SDRAM_SRAM FMC_BCR1_BMAP_0
  632. #define FMC_SWAPBMAP_SDRAMB2 FMC_BCR1_BMAP_1
  633. #define IS_FMC_SWAPBMAP_MODE(__MODE__) (((__MODE__) == FMC_SWAPBMAP_DISABLE) || \
  634. ((__MODE__) == FMC_SWAPBMAP_SDRAM_SRAM) || \
  635. ((__MODE__) == FMC_SWAPBMAP_SDRAMB2))
  636. /**
  637. * @}
  638. */
  639. /**
  640. * @}
  641. */
  642. /* Exported macro ------------------------------------------------------------*/
  643. /** @defgroup HAL_Exported_Macros HAL Exported Macros
  644. * @{
  645. */
  646. #if defined(DUAL_CORE)
  647. /** @defgroup ART_Exported_Macros ART Exported Macros
  648. * @{
  649. */
  650. /** @brief ART Enable Macro.
  651. * Enable the Cortex-M4 ART cache.
  652. */
  653. #define __HAL_ART_ENABLE() SET_BIT(ART->CTR, ART_CTR_EN)
  654. /** @brief ART Disable Macro.
  655. * Disable the Cortex-M4 ART cache.
  656. */
  657. #define __HAL_ART_DISABLE() CLEAR_BIT(ART->CTR, ART_CTR_EN)
  658. /** @brief ART Cache BaseAddress Config.
  659. * Configure the Cortex-M4 ART cache Base Address.
  660. */
  661. #define __HAL_ART_CONFIG_BASE_ADDRESS(__BASE_ADDRESS__) MODIFY_REG(ART->CTR, ART_CTR_PCACHEADDR, (((__BASE_ADDRESS__) >> 12U) & 0x000FFF00UL))
  662. /**
  663. * @}
  664. */
  665. #endif /* DUAL_CORE */
  666. /** @defgroup SYSCFG_Exported_Macros SYSCFG Exported Macros
  667. * @{
  668. */
  669. /** @brief SYSCFG Break AXIRAM double ECC lock.
  670. * Enable and lock the connection of AXIRAM double ECC error to TIM1/8/15/16/17 and HRTIMER Break input.
  671. * @note The selected configuration is locked and can be unlocked only by system reset.
  672. This feature is available on STM32H7 rev.B and above.
  673. */
  674. #define __HAL_SYSCFG_BREAK_AXISRAM_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_AXISRAML)
  675. /** @brief SYSCFG Break ITCM double ECC lock.
  676. * Enable and lock the connection of ITCM double ECC error to TIM1/8/15/16/17 and HRTIMER Break input.
  677. * @note The selected configuration is locked and can be unlocked only by system reset.
  678. This feature is available on STM32H7 rev.B and above.
  679. */
  680. #define __HAL_SYSCFG_BREAK_ITCM_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_ITCML)
  681. /** @brief SYSCFG Break DTCM double ECC lock.
  682. * Enable and lock the connection of DTCM double ECC error to TIM1/8/15/16/17 and HRTIMER Break input.
  683. * @note The selected configuration is locked and can be unlocked only by system reset.
  684. This feature is available on STM32H7 rev.B and above.
  685. */
  686. #define __HAL_SYSCFG_BREAK_DTCM_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_DTCML)
  687. /** @brief SYSCFG Break SRAM1 double ECC lock.
  688. * Enable and lock the connection of SRAM1 double ECC error to TIM1/8/15/16/17 and HRTIMER Break input.
  689. * @note The selected configuration is locked and can be unlocked only by system reset.
  690. This feature is available on STM32H7 rev.B and above.
  691. */
  692. #define __HAL_SYSCFG_BREAK_SRAM1_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_SRAM1L)
  693. /** @brief SYSCFG Break SRAM2 double ECC lock.
  694. * Enable and lock the connection of SRAM2 double ECC error to TIM1/8/15/16/17 and HRTIMER Break input.
  695. * @note The selected configuration is locked and can be unlocked only by system reset.
  696. This feature is available on STM32H7 rev.B and above.
  697. */
  698. #define __HAL_SYSCFG_BREAK_SRAM2_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_SRAM2L)
  699. /** @brief SYSCFG Break SRAM3 double ECC lock.
  700. * Enable and lock the connection of SRAM3 double ECC error to TIM1/8/15/16/17 and HRTIMER Break input.
  701. * @note The selected configuration is locked and can be unlocked only by system reset.
  702. This feature is available on STM32H7 rev.B and above.
  703. */
  704. #define __HAL_SYSCFG_BREAK_SRAM3_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_SRAM3L)
  705. /** @brief SYSCFG Break SRAM4 double ECC lock.
  706. * Enable and lock the connection of SRAM4 double ECC error to TIM1/8/15/16/17 and HRTIMER Break input.
  707. * @note The selected configuration is locked and can be unlocked only by system reset.
  708. This feature is available on STM32H7 rev.B and above.
  709. */
  710. #define __HAL_SYSCFG_BREAK_SRAM4_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_SRAM4L)
  711. /** @brief SYSCFG Break Backup SRAM double ECC lock.
  712. * Enable and lock the connection of Backup SRAM double ECC error to TIM1/8/15/16/17 and HRTIMER Break input.
  713. * @note The selected configuration is locked and can be unlocked only by system reset.
  714. This feature is available on STM32H7 rev.B and above.
  715. */
  716. #define __HAL_SYSCFG_BREAK_BKRAM_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_BKRAML)
  717. /** @brief SYSCFG Break Cortex-M7 Lockup lock.
  718. * Enable and lock the connection of Cortex-M7 LOCKUP output to TIM1/8/15/16/17 and HRTIMER Break input.
  719. * @note The selected configuration is locked and can be unlocked only by system reset.
  720. This feature is available on STM32H7 rev.B and above.
  721. */
  722. #define __HAL_SYSCFG_BREAK_CM7_LOCKUP_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_CM7L)
  723. /** @brief SYSCFG Break FLASH double ECC lock.
  724. * Enable and lock the connection of Flash double ECC error connection to TIM1/8/15/16/17 and HRTIMER Break input.
  725. * @note The selected configuration is locked and can be unlocked only by system reset.
  726. This feature is available on STM32H7 rev.B and above.
  727. */
  728. #define __HAL_SYSCFG_BREAK_FLASH_DBL_ECC_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_FLASHL)
  729. /** @brief SYSCFG Break PVD lock.
  730. * Enable and lock the PVD connection to Timer1/8/15/16/17 and HRTIMER Break input, as well as the PVDE and PLS[2:0] in the PWR_CR1 register.
  731. * @note The selected configuration is locked and can be unlocked only by system reset.
  732. This feature is available on STM32H7 rev.B and above.
  733. */
  734. #define __HAL_SYSCFG_BREAK_PVD_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_PVDL)
  735. #if defined(DUAL_CORE)
  736. /** @brief SYSCFG Break Cortex-M4 Lockup lock.
  737. * Enable and lock the connection of Cortex-M4 LOCKUP output to TIM1/8/15/16/17 and HRTIMER Break input.
  738. * @note The selected configuration is locked and can be unlocked only by system reset.
  739. This feature is available on STM32H7 rev.B and above.
  740. */
  741. #define __HAL_SYSCFG_BREAK_CM4_LOCKUP_LOCK() SET_BIT(SYSCFG->CFGR, SYSCFG_CFGR_CM4L)
  742. #endif /* DUAL_CORE */
  743. #if !defined(SYSCFG_PMCR_BOOSTEN)
  744. /** @brief Fast-mode Plus driving capability enable/disable macros
  745. * @param __FASTMODEPLUS__ This parameter can be a value of :
  746. * @arg @ref SYSCFG_FASTMODEPLUS_PB6 Fast-mode Plus driving capability activation on PB6
  747. * @arg @ref SYSCFG_FASTMODEPLUS_PB7 Fast-mode Plus driving capability activation on PB7
  748. * @arg @ref SYSCFG_FASTMODEPLUS_PB8 Fast-mode Plus driving capability activation on PB8
  749. * @arg @ref SYSCFG_FASTMODEPLUS_PB9 Fast-mode Plus driving capability activation on PB9
  750. */
  751. #define __HAL_SYSCFG_FASTMODEPLUS_ENABLE(__FASTMODEPLUS__) do {assert_param(IS_SYSCFG_FASTMODEPLUS((__FASTMODEPLUS__)));\
  752. SET_BIT(SYSCFG->PMCR, (__FASTMODEPLUS__));\
  753. }while(0)
  754. #define __HAL_SYSCFG_FASTMODEPLUS_DISABLE(__FASTMODEPLUS__) do {assert_param(IS_SYSCFG_FASTMODEPLUS((__FASTMODEPLUS__)));\
  755. CLEAR_BIT(SYSCFG->PMCR, (__FASTMODEPLUS__));\
  756. }while(0)
  757. #endif /* !SYSCFG_PMCR_BOOSTEN */
  758. /**
  759. * @}
  760. */
  761. /** @defgroup DBG_Exported_Macros DBG Exported Macros
  762. * @{
  763. */
  764. /** @brief Freeze/Unfreeze Peripherals in Debug mode
  765. */
  766. #define __HAL_DBGMCU_FREEZE_WWDG1() (DBGMCU->APB3FZ1 |= (DBGMCU_APB3FZ1_DBG_WWDG1))
  767. #define __HAL_DBGMCU_FREEZE_TIM2() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM2))
  768. #define __HAL_DBGMCU_FREEZE_TIM3() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM3))
  769. #define __HAL_DBGMCU_FREEZE_TIM4() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM4))
  770. #define __HAL_DBGMCU_FREEZE_TIM5() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM5))
  771. #define __HAL_DBGMCU_FREEZE_TIM6() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM6))
  772. #define __HAL_DBGMCU_FREEZE_TIM7() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM7))
  773. #define __HAL_DBGMCU_FREEZE_TIM12() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM12))
  774. #define __HAL_DBGMCU_FREEZE_TIM13() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM13))
  775. #define __HAL_DBGMCU_FREEZE_TIM14() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_TIM14))
  776. #define __HAL_DBGMCU_FREEZE_LPTIM1() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_LPTIM1))
  777. #define __HAL_DBGMCU_FREEZE_I2C1() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_I2C1))
  778. #define __HAL_DBGMCU_FREEZE_I2C2() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_I2C2))
  779. #define __HAL_DBGMCU_FREEZE_I2C3() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_I2C3))
  780. #if defined(I2C5)
  781. #define __HAL_DBGMCU_FREEZE_I2C5() (DBGMCU->APB1LFZ1 |= (DBGMCU_APB1LFZ1_DBG_I2C5))
  782. #endif /*I2C5*/
  783. #if defined(DBGMCU_APB1HFZ1_DBG_FDCAN)
  784. #define __HAL_DBGMCU_FREEZE_FDCAN() (DBGMCU->APB1HFZ1 |= (DBGMCU_APB1HFZ1_DBG_FDCAN))
  785. #endif /*DBGMCU_APB1HFZ1_DBG_FDCAN*/
  786. #if defined(TIM23)
  787. #define __HAL_DBGMCU_FREEZE_TIM23() (DBGMCU->APB1HFZ1 |= (DBGMCU_APB1HFZ1_DBG_TIM23))
  788. #endif /*TIM23*/
  789. #if defined(TIM24)
  790. #define __HAL_DBGMCU_FREEZE_TIM24() (DBGMCU->APB1HFZ1 |= (DBGMCU_APB1HFZ1_DBG_TIM24))
  791. #endif /*TIM24*/
  792. #define __HAL_DBGMCU_FREEZE_TIM1() (DBGMCU->APB2FZ1 |= (DBGMCU_APB2FZ1_DBG_TIM1))
  793. #define __HAL_DBGMCU_FREEZE_TIM8() (DBGMCU->APB2FZ1 |= (DBGMCU_APB2FZ1_DBG_TIM8))
  794. #define __HAL_DBGMCU_FREEZE_TIM15() (DBGMCU->APB2FZ1 |= (DBGMCU_APB2FZ1_DBG_TIM15))
  795. #define __HAL_DBGMCU_FREEZE_TIM16() (DBGMCU->APB2FZ1 |= (DBGMCU_APB2FZ1_DBG_TIM16))
  796. #define __HAL_DBGMCU_FREEZE_TIM17() (DBGMCU->APB2FZ1 |= (DBGMCU_APB2FZ1_DBG_TIM17))
  797. #define __HAL_DBGMCU_FREEZE_HRTIM() (DBGMCU->APB2FZ1 |= (DBGMCU_APB2FZ1_DBG_HRTIM))
  798. #define __HAL_DBGMCU_FREEZE_I2C4() (DBGMCU->APB4FZ1 |= (DBGMCU_APB4FZ1_DBG_I2C4))
  799. #define __HAL_DBGMCU_FREEZE_LPTIM2() (DBGMCU->APB4FZ1 |= (DBGMCU_APB4FZ1_DBG_LPTIM2))
  800. #define __HAL_DBGMCU_FREEZE_LPTIM3() (DBGMCU->APB4FZ1 |= (DBGMCU_APB4FZ1_DBG_LPTIM3))
  801. #define __HAL_DBGMCU_FREEZE_LPTIM4() (DBGMCU->APB4FZ1 |= (DBGMCU_APB4FZ1_DBG_LPTIM4))
  802. #define __HAL_DBGMCU_FREEZE_LPTIM5() (DBGMCU->APB4FZ1 |= (DBGMCU_APB4FZ1_DBG_LPTIM5))
  803. #define __HAL_DBGMCU_FREEZE_RTC() (DBGMCU->APB4FZ1 |= (DBGMCU_APB4FZ1_DBG_RTC))
  804. #define __HAL_DBGMCU_FREEZE_IWDG1() (DBGMCU->APB4FZ1 |= (DBGMCU_APB4FZ1_DBG_IWDG1))
  805. #define __HAL_DBGMCU_UnFreeze_WWDG1() (DBGMCU->APB3FZ1 &= ~ (DBGMCU_APB3FZ1_DBG_WWDG1))
  806. #define __HAL_DBGMCU_UnFreeze_TIM2() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM2))
  807. #define __HAL_DBGMCU_UnFreeze_TIM3() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM3))
  808. #define __HAL_DBGMCU_UnFreeze_TIM4() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM4))
  809. #define __HAL_DBGMCU_UnFreeze_TIM5() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM5))
  810. #define __HAL_DBGMCU_UnFreeze_TIM6() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM6))
  811. #define __HAL_DBGMCU_UnFreeze_TIM7() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM7))
  812. #define __HAL_DBGMCU_UnFreeze_TIM12() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM12))
  813. #define __HAL_DBGMCU_UnFreeze_TIM13() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM13))
  814. #define __HAL_DBGMCU_UnFreeze_TIM14() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_TIM14))
  815. #define __HAL_DBGMCU_UnFreeze_LPTIM1() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_LPTIM1))
  816. #define __HAL_DBGMCU_UnFreeze_I2C1() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_I2C1))
  817. #define __HAL_DBGMCU_UnFreeze_I2C2() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_I2C2))
  818. #define __HAL_DBGMCU_UnFreeze_I2C3() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_I2C3))
  819. #if defined(I2C5)
  820. #define __HAL_DBGMCU_UnFreeze_I2C5() (DBGMCU->APB1LFZ1 &= ~ (DBGMCU_APB1LFZ1_DBG_I2C5))
  821. #endif /*I2C5*/
  822. #if defined(DBGMCU_APB1HFZ1_DBG_FDCAN)
  823. #define __HAL_DBGMCU_UnFreeze_FDCAN() (DBGMCU->APB1HFZ1 &= ~ (DBGMCU_APB1HFZ1_DBG_FDCAN))
  824. #endif /*DBGMCU_APB1HFZ1_DBG_FDCAN*/
  825. #if defined(TIM23)
  826. #define __HAL_DBGMCU_UnFreeze_TIM23() (DBGMCU->APB1HFZ1 &= ~ (DBGMCU_APB1HFZ1_DBG_TIM23))
  827. #endif /*TIM23*/
  828. #if defined(TIM24)
  829. #define __HAL_DBGMCU_UnFreeze_TIM24() (DBGMCU->APB1HFZ1 &= ~ (DBGMCU_APB1HFZ1_DBG_TIM24))
  830. #endif /*TIM24*/
  831. #define __HAL_DBGMCU_UnFreeze_TIM1() (DBGMCU->APB2FZ1 &= ~ (DBGMCU_APB2FZ1_DBG_TIM1))
  832. #define __HAL_DBGMCU_UnFreeze_TIM8() (DBGMCU->APB2FZ1 &= ~ (DBGMCU_APB2FZ1_DBG_TIM8))
  833. #define __HAL_DBGMCU_UnFreeze_TIM15() (DBGMCU->APB2FZ1 &= ~ (DBGMCU_APB2FZ1_DBG_TIM15))
  834. #define __HAL_DBGMCU_UnFreeze_TIM16() (DBGMCU->APB2FZ1 &= ~ (DBGMCU_APB2FZ1_DBG_TIM16))
  835. #define __HAL_DBGMCU_UnFreeze_TIM17() (DBGMCU->APB2FZ1 &= ~ (DBGMCU_APB2FZ1_DBG_TIM17))
  836. #define __HAL_DBGMCU_UnFreeze_HRTIM() (DBGMCU->APB2FZ1 &= ~ (DBGMCU_APB2FZ1_DBG_HRTIM))
  837. #define __HAL_DBGMCU_UnFreeze_I2C4() (DBGMCU->APB4FZ1 &= ~ (DBGMCU_APB4FZ1_DBG_I2C4))
  838. #define __HAL_DBGMCU_UnFreeze_LPTIM2() (DBGMCU->APB4FZ1 &= ~ (DBGMCU_APB4FZ1_DBG_LPTIM2))
  839. #define __HAL_DBGMCU_UnFreeze_LPTIM3() (DBGMCU->APB4FZ1 &= ~ (DBGMCU_APB4FZ1_DBG_LPTIM3))
  840. #define __HAL_DBGMCU_UnFreeze_LPTIM4() (DBGMCU->APB4FZ1 &= ~ (DBGMCU_APB4FZ1_DBG_LPTIM4))
  841. #define __HAL_DBGMCU_UnFreeze_LPTIM5() (DBGMCU->APB4FZ1 &= ~ (DBGMCU_APB4FZ1_DBG_LPTIM5))
  842. #define __HAL_DBGMCU_UnFreeze_RTC() (DBGMCU->APB4FZ1 &= ~ (DBGMCU_APB4FZ1_DBG_RTC))
  843. #define __HAL_DBGMCU_UnFreeze_IWDG1() (DBGMCU->APB4FZ1 &= ~ (DBGMCU_APB4FZ1_DBG_IWDG1))
  844. #if defined(DUAL_CORE)
  845. #define __HAL_DBGMCU_FREEZE2_IWDG2() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_IWDG2))
  846. #define __HAL_DBGMCU_FREEZE2_WWDG2() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_WWDG2))
  847. #define __HAL_DBGMCU_UnFreeze2_IWDG2() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_IWDG2))
  848. #define __HAL_DBGMCU_UnFreeze2_WWDG2() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_WWDG2))
  849. #define __HAL_DBGMCU_FREEZE2_WWDG1() (DBGMCU->APB3FZ2 |= (DBGMCU_APB3FZ2_DBG_WWDG1))
  850. #define __HAL_DBGMCU_FREEZE2_TIM2() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM2))
  851. #define __HAL_DBGMCU_FREEZE2_TIM3() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM3))
  852. #define __HAL_DBGMCU_FREEZE2_TIM4() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM4))
  853. #define __HAL_DBGMCU_FREEZE2_TIM5() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM5))
  854. #define __HAL_DBGMCU_FREEZE2_TIM6() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM6))
  855. #define __HAL_DBGMCU_FREEZE2_TIM7() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM7))
  856. #define __HAL_DBGMCU_FREEZE2_TIM12() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM12))
  857. #define __HAL_DBGMCU_FREEZE2_TIM13() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM13))
  858. #define __HAL_DBGMCU_FREEZE2_TIM14() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_TIM14))
  859. #define __HAL_DBGMCU_FREEZE2_LPTIM1() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_LPTIM1))
  860. #define __HAL_DBGMCU_FREEZE2_I2C1() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_I2C1))
  861. #define __HAL_DBGMCU_FREEZE2_I2C2() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_I2C2))
  862. #define __HAL_DBGMCU_FREEZE2_I2C3() (DBGMCU->APB1LFZ2 |= (DBGMCU_APB1LFZ2_DBG_I2C3))
  863. #define __HAL_DBGMCU_FREEZE2_FDCAN() (DBGMCU->APB1HFZ2 |= (DBGMCU_APB1HFZ2_DBG_FDCAN))
  864. #define __HAL_DBGMCU_FREEZE2_TIM1() (DBGMCU->APB2FZ2 |= (DBGMCU_APB2FZ2_DBG_TIM1))
  865. #define __HAL_DBGMCU_FREEZE2_TIM8() (DBGMCU->APB2FZ2 |= (DBGMCU_APB2FZ2_DBG_TIM8))
  866. #define __HAL_DBGMCU_FREEZE2_TIM15() (DBGMCU->APB2FZ2 |= (DBGMCU_APB2FZ2_DBG_TIM15))
  867. #define __HAL_DBGMCU_FREEZE2_TIM16() (DBGMCU->APB2FZ2 |= (DBGMCU_APB2FZ2_DBG_TIM16))
  868. #define __HAL_DBGMCU_FREEZE2_TIM17() (DBGMCU->APB2FZ2 |= (DBGMCU_APB2FZ2_DBG_TIM17))
  869. #define __HAL_DBGMCU_FREEZE2_HRTIM() (DBGMCU->APB2FZ2 |= (DBGMCU_APB2FZ2_DBG_HRTIM))
  870. #define __HAL_DBGMCU_FREEZE2_I2C4() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_I2C4))
  871. #define __HAL_DBGMCU_FREEZE2_LPTIM2() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_LPTIM2))
  872. #define __HAL_DBGMCU_FREEZE2_LPTIM3() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_LPTIM3))
  873. #define __HAL_DBGMCU_FREEZE2_LPTIM4() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_LPTIM4))
  874. #define __HAL_DBGMCU_FREEZE2_LPTIM5() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_LPTIM5))
  875. #define __HAL_DBGMCU_FREEZE2_RTC() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_RTC))
  876. #define __HAL_DBGMCU_FREEZE2_IWDG1() (DBGMCU->APB4FZ2 |= (DBGMCU_APB4FZ2_DBG_IWDG1))
  877. #define __HAL_DBGMCU_UnFreeze2_WWDG1() (DBGMCU->APB3FZ2 &= ~ (DBGMCU_APB3FZ2_DBG_WWDG1))
  878. #define __HAL_DBGMCU_UnFreeze2_TIM2() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM2))
  879. #define __HAL_DBGMCU_UnFreeze2_TIM3() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM3))
  880. #define __HAL_DBGMCU_UnFreeze2_TIM4() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM4))
  881. #define __HAL_DBGMCU_UnFreeze2_TIM5() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM5))
  882. #define __HAL_DBGMCU_UnFreeze2_TIM6() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM6))
  883. #define __HAL_DBGMCU_UnFreeze2_TIM7() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM7))
  884. #define __HAL_DBGMCU_UnFreeze2_TIM12() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM12))
  885. #define __HAL_DBGMCU_UnFreeze2_TIM13() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM13))
  886. #define __HAL_DBGMCU_UnFreeze2_TIM14() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_TIM14))
  887. #define __HAL_DBGMCU_UnFreeze2_LPTIM1() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_LPTIM1))
  888. #define __HAL_DBGMCU_UnFreeze2_I2C1() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_I2C1))
  889. #define __HAL_DBGMCU_UnFreeze2_I2C2() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_I2C2))
  890. #define __HAL_DBGMCU_UnFreeze2_I2C3() (DBGMCU->APB1LFZ2 &= ~ (DBGMCU_APB1LFZ2_DBG_I2C3))
  891. #define __HAL_DBGMCU_UnFreeze2_FDCAN() (DBGMCU->APB1HFZ2 &= ~ (DBGMCU_APB1HFZ2_DBG_FDCAN))
  892. #define __HAL_DBGMCU_UnFreeze2_TIM1() (DBGMCU->APB2FZ2 &= ~ (DBGMCU_APB2FZ2_DBG_TIM1))
  893. #define __HAL_DBGMCU_UnFreeze2_TIM8() (DBGMCU->APB2FZ2 &= ~ (DBGMCU_APB2FZ2_DBG_TIM8))
  894. #define __HAL_DBGMCU_UnFreeze2_TIM15() (DBGMCU->APB2FZ2 &= ~ (DBGMCU_APB2FZ2_DBG_TIM15))
  895. #define __HAL_DBGMCU_UnFreeze2_TIM16() (DBGMCU->APB2FZ2 &= ~ (DBGMCU_APB2FZ2_DBG_TIM16))
  896. #define __HAL_DBGMCU_UnFreeze2_TIM17() (DBGMCU->APB2FZ2 &= ~ (DBGMCU_APB2FZ2_DBG_TIM17))
  897. #define __HAL_DBGMCU_UnFreeze2_HRTIM() (DBGMCU->APB2FZ2 &= ~ (DBGMCU_APB2FZ2_DBG_HRTIM))
  898. #define __HAL_DBGMCU_UnFreeze2_I2C4() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_I2C4))
  899. #define __HAL_DBGMCU_UnFreeze2_LPTIM2() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_LPTIM2))
  900. #define __HAL_DBGMCU_UnFreeze2_LPTIM3() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_LPTIM3))
  901. #define __HAL_DBGMCU_UnFreeze2_LPTIM4() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_LPTIM4))
  902. #define __HAL_DBGMCU_UnFreeze2_LPTIM5() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_LPTIM5))
  903. #define __HAL_DBGMCU_UnFreeze2_RTC() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_RTC))
  904. #define __HAL_DBGMCU_UnFreeze2_IWDG1() (DBGMCU->APB4FZ2 &= ~ (DBGMCU_APB4FZ2_DBG_IWDG1))
  905. #endif /*DUAL_CORE*/
  906. /**
  907. * @}
  908. */
  909. /**
  910. * @}
  911. */
  912. /** @defgroup HAL_Private_Macros HAL Private Macros
  913. * @{
  914. */
  915. #define IS_TICKFREQ(FREQ) (((FREQ) == HAL_TICK_FREQ_10HZ) || \
  916. ((FREQ) == HAL_TICK_FREQ_100HZ) || \
  917. ((FREQ) == HAL_TICK_FREQ_1KHZ))
  918. /**
  919. * @}
  920. */
  921. /* Exported variables --------------------------------------------------------*/
  922. /** @addtogroup HAL_Exported_Variables
  923. * @{
  924. */
  925. extern __IO uint32_t uwTick;
  926. extern uint32_t uwTickPrio;
  927. extern HAL_TickFreqTypeDef uwTickFreq;
  928. /**
  929. * @}
  930. */
  931. /* Exported functions --------------------------------------------------------*/
  932. /** @defgroup HAL_Exported_Functions HAL Exported Functions
  933. * @{
  934. */
  935. /* Initialization and de-initialization functions ******************************/
  936. /** @defgroup HAL_Group1 Initialization and de-initialization Functions
  937. * @{
  938. */
  939. HAL_StatusTypeDef HAL_Init(void);
  940. HAL_StatusTypeDef HAL_DeInit(void);
  941. void HAL_MspInit(void);
  942. void HAL_MspDeInit(void);
  943. HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority);
  944. /**
  945. * @}
  946. */
  947. /* Peripheral Control functions ************************************************/
  948. /** @defgroup HAL_Group2 HAL Control functions
  949. *
  950. */
  951. void HAL_IncTick(void);
  952. void HAL_Delay(uint32_t Delay);
  953. uint32_t HAL_GetTick(void);
  954. uint32_t HAL_GetTickPrio(void);
  955. HAL_StatusTypeDef HAL_SetTickFreq(HAL_TickFreqTypeDef Freq);
  956. HAL_TickFreqTypeDef HAL_GetTickFreq(void);
  957. void HAL_SuspendTick(void);
  958. void HAL_ResumeTick(void);
  959. uint32_t HAL_GetHalVersion(void);
  960. uint32_t HAL_GetREVID(void);
  961. uint32_t HAL_GetDEVID(void);
  962. uint32_t HAL_GetUIDw0(void);
  963. uint32_t HAL_GetUIDw1(void);
  964. uint32_t HAL_GetUIDw2(void);
  965. #if defined(SYSCFG_PMCR_EPIS_SEL)
  966. void HAL_SYSCFG_ETHInterfaceSelect(uint32_t SYSCFG_ETHInterface);
  967. #endif /* SYSCFG_PMCR_EPIS_SEL */
  968. void HAL_SYSCFG_AnalogSwitchConfig(uint32_t SYSCFG_AnalogSwitch , uint32_t SYSCFG_SwitchState );
  969. #if defined(SYSCFG_PMCR_BOOSTEN)
  970. void HAL_SYSCFG_EnableBOOST(void);
  971. void HAL_SYSCFG_DisableBOOST(void);
  972. #endif /* SYSCFG_PMCR_BOOSTEN */
  973. #if defined (SYSCFG_UR2_BOOT_ADD0) || defined (SYSCFG_UR2_BCM7_ADD0)
  974. void HAL_SYSCFG_CM7BootAddConfig(uint32_t BootRegister, uint32_t BootAddress);
  975. #endif /* SYSCFG_UR2_BOOT_ADD0 || SYSCFG_UR2_BCM7_ADD0*/
  976. #if defined(DUAL_CORE)
  977. void HAL_SYSCFG_CM4BootAddConfig(uint32_t BootRegister, uint32_t BootAddress);
  978. void HAL_SYSCFG_EnableCM7BOOT(void);
  979. void HAL_SYSCFG_DisableCM7BOOT(void);
  980. void HAL_SYSCFG_EnableCM4BOOT(void);
  981. void HAL_SYSCFG_DisableCM4BOOT(void);
  982. #endif /*DUAL_CORE*/
  983. void HAL_EnableCompensationCell(void);
  984. void HAL_DisableCompensationCell(void);
  985. void HAL_SYSCFG_EnableIOSpeedOptimize(void);
  986. void HAL_SYSCFG_DisableIOSpeedOptimize(void);
  987. void HAL_SYSCFG_CompensationCodeSelect(uint32_t SYSCFG_CompCode);
  988. void HAL_SYSCFG_CompensationCodeConfig(uint32_t SYSCFG_PMOSCode, uint32_t SYSCFG_NMOSCode);
  989. #if defined(SYSCFG_CCCR_NCC_MMC)
  990. void HAL_SYSCFG_VDDMMC_CompensationCodeConfig(uint32_t SYSCFG_PMOSCode, uint32_t SYSCFG_NMOSCode);
  991. #endif /* SYSCFG_CCCR_NCC_MMC */
  992. void HAL_DBGMCU_EnableDBGSleepMode(void);
  993. void HAL_DBGMCU_DisableDBGSleepMode(void);
  994. void HAL_DBGMCU_EnableDBGStopMode(void);
  995. void HAL_DBGMCU_DisableDBGStopMode(void);
  996. void HAL_DBGMCU_EnableDBGStandbyMode(void);
  997. void HAL_DBGMCU_DisableDBGStandbyMode(void);
  998. #if defined(DUAL_CORE)
  999. void HAL_EnableDomain2DBGSleepMode(void);
  1000. void HAL_DisableDomain2DBGSleepMode(void);
  1001. void HAL_EnableDomain2DBGStopMode(void);
  1002. void HAL_DisableDomain2DBGStopMode(void);
  1003. void HAL_EnableDomain2DBGStandbyMode(void);
  1004. void HAL_DisableDomain2DBGStandbyMode(void);
  1005. #endif /*DUAL_CORE*/
  1006. #if defined(DBGMCU_CR_DBG_STOPD3)
  1007. void HAL_EnableDomain3DBGStopMode(void);
  1008. void HAL_DisableDomain3DBGStopMode(void);
  1009. #endif /*DBGMCU_CR_DBG_STOPD3*/
  1010. #if defined(DBGMCU_CR_DBG_STANDBYD3)
  1011. void HAL_EnableDomain3DBGStandbyMode(void);
  1012. void HAL_DisableDomain3DBGStandbyMode(void);
  1013. #endif /*DBGMCU_CR_DBG_STANDBYD3*/
  1014. void HAL_EXTI_EdgeConfig(uint32_t EXTI_Line , uint32_t EXTI_Edge );
  1015. void HAL_EXTI_GenerateSWInterrupt(uint32_t EXTI_Line);
  1016. #if defined(DUAL_CORE)
  1017. void HAL_EXTI_D2_ClearFlag(uint32_t EXTI_Line);
  1018. #endif /*DUAL_CORE*/
  1019. void HAL_EXTI_D1_ClearFlag(uint32_t EXTI_Line);
  1020. void HAL_EXTI_D1_EventInputConfig(uint32_t EXTI_Line , uint32_t EXTI_Mode, uint32_t EXTI_LineCmd);
  1021. #if defined(DUAL_CORE)
  1022. void HAL_EXTI_D2_EventInputConfig(uint32_t EXTI_Line , uint32_t EXTI_Mode, uint32_t EXTI_LineCmd);
  1023. #endif /*DUAL_CORE*/
  1024. void HAL_EXTI_D3_EventInputConfig(uint32_t EXTI_Line, uint32_t EXTI_LineCmd , uint32_t EXTI_ClearSrc);
  1025. void HAL_SetFMCMemorySwappingConfig(uint32_t BankMapConfig);
  1026. uint32_t HAL_GetFMCMemorySwappingConfig(void);
  1027. void HAL_SYSCFG_VREFBUF_VoltageScalingConfig(uint32_t VoltageScaling);
  1028. void HAL_SYSCFG_VREFBUF_HighImpedanceConfig(uint32_t Mode);
  1029. void HAL_SYSCFG_VREFBUF_TrimmingConfig(uint32_t TrimmingValue);
  1030. HAL_StatusTypeDef HAL_SYSCFG_EnableVREFBUF(void);
  1031. void HAL_SYSCFG_DisableVREFBUF(void);
  1032. #if defined(SYSCFG_ADC2ALT_ADC2_ROUT0)
  1033. void HAL_SYSCFG_ADC2ALT_Rout0Config(uint32_t Adc2AltRout0);
  1034. #endif /*SYSCFG_ADC2ALT_ADC2_ROUT0*/
  1035. #if defined(SYSCFG_ADC2ALT_ADC2_ROUT1)
  1036. void HAL_SYSCFG_ADC2ALT_Rout1Config(uint32_t Adc2AltRout1);
  1037. #endif /*SYSCFG_ADC2ALT_ADC2_ROUT1*/
  1038. /**
  1039. * @}
  1040. */
  1041. /**
  1042. * @}
  1043. */
  1044. /**
  1045. * @}
  1046. */
  1047. /**
  1048. * @}
  1049. */
  1050. #ifdef __cplusplus
  1051. }
  1052. #endif
  1053. #endif /* STM32H7xx_HAL_H */