stm32f0xx_hal.h 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. /**
  2. ******************************************************************************
  3. * @file stm32f0xx_hal.h
  4. * @author MCD Application Team
  5. * @version V1.5.0
  6. * @date 04-November-2016
  7. * @brief This file contains all the functions prototypes for the HAL
  8. * module driver.
  9. ******************************************************************************
  10. * @attention
  11. *
  12. * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
  13. *
  14. * Redistribution and use in source and binary forms, with or without modification,
  15. * are permitted provided that the following conditions are met:
  16. * 1. Redistributions of source code must retain the above copyright notice,
  17. * this list of conditions and the following disclaimer.
  18. * 2. Redistributions in binary form must reproduce the above copyright notice,
  19. * this list of conditions and the following disclaimer in the documentation
  20. * and/or other materials provided with the distribution.
  21. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  22. * may be used to endorse or promote products derived from this software
  23. * without specific prior written permission.
  24. *
  25. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  26. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  27. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  28. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  29. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  30. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  31. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  32. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  33. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  34. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. *
  36. ******************************************************************************
  37. */
  38. /* Define to prevent recursive inclusion -------------------------------------*/
  39. #ifndef __STM32F0xx_HAL_H
  40. #define __STM32F0xx_HAL_H
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44. /* Includes ------------------------------------------------------------------*/
  45. #include "stm32f0xx_hal_conf.h"
  46. /** @addtogroup STM32F0xx_HAL_Driver
  47. * @{
  48. */
  49. /** @addtogroup HAL
  50. * @{
  51. */
  52. /* Private macros ------------------------------------------------------------*/
  53. /** @addtogroup HAL_Private_Macros
  54. * @{
  55. */
  56. #if defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F042x6) || defined(STM32F048xx) || \
  57. defined(STM32F030x6) || defined(STM32F031x6) || defined(STM32F038xx) || defined(STM32F070x6) || \
  58. defined(STM32F070xB) || defined(STM32F030x6)
  59. #define IS_SYSCFG_FASTMODEPLUS(__PIN__) ((((__PIN__) & SYSCFG_FASTMODEPLUS_PA9) == SYSCFG_FASTMODEPLUS_PA9) || \
  60. (((__PIN__) & SYSCFG_FASTMODEPLUS_PA10) == SYSCFG_FASTMODEPLUS_PA10) || \
  61. (((__PIN__) & SYSCFG_FASTMODEPLUS_PB6) == SYSCFG_FASTMODEPLUS_PB6) || \
  62. (((__PIN__) & SYSCFG_FASTMODEPLUS_PB7) == SYSCFG_FASTMODEPLUS_PB7) || \
  63. (((__PIN__) & SYSCFG_FASTMODEPLUS_PB8) == SYSCFG_FASTMODEPLUS_PB8) || \
  64. (((__PIN__) & SYSCFG_FASTMODEPLUS_PB9) == SYSCFG_FASTMODEPLUS_PB9))
  65. #else
  66. #define IS_SYSCFG_FASTMODEPLUS(__PIN__) ((((__PIN__) & SYSCFG_FASTMODEPLUS_PB6) == SYSCFG_FASTMODEPLUS_PB6) || \
  67. (((__PIN__) & SYSCFG_FASTMODEPLUS_PB7) == SYSCFG_FASTMODEPLUS_PB7) || \
  68. (((__PIN__) & SYSCFG_FASTMODEPLUS_PB8) == SYSCFG_FASTMODEPLUS_PB8) || \
  69. (((__PIN__) & SYSCFG_FASTMODEPLUS_PB9) == SYSCFG_FASTMODEPLUS_PB9))
  70. #endif
  71. #if defined(SYSCFG_CFGR1_PA11_PA12_RMP)
  72. #define IS_HAL_REMAP_PIN(RMP) ((RMP) == HAL_REMAP_PA11_PA12)
  73. #endif /* SYSCFG_CFGR1_PA11_PA12_RMP */
  74. #if defined(STM32F091xC) || defined(STM32F098xx)
  75. #define IS_HAL_SYSCFG_IRDA_ENV_SEL(SEL) (((SEL) == HAL_SYSCFG_IRDA_ENV_SEL_TIM16) || \
  76. ((SEL) == HAL_SYSCFG_IRDA_ENV_SEL_USART1) || \
  77. ((SEL) == HAL_SYSCFG_IRDA_ENV_SEL_USART4))
  78. #endif /* STM32F091xC || STM32F098xx */
  79. /**
  80. * @}
  81. */
  82. /* Exported types ------------------------------------------------------------*/
  83. /* Exported constants --------------------------------------------------------*/
  84. /** @defgroup HAL_Exported_Constants HAL Exported Constants
  85. * @{
  86. */
  87. #if defined(SYSCFG_CFGR1_PA11_PA12_RMP)
  88. /** @defgroup HAL_Pin_remapping HAL Pin remapping
  89. * @{
  90. */
  91. #define HAL_REMAP_PA11_PA12 (SYSCFG_CFGR1_PA11_PA12_RMP) /*!< PA11 and PA12 remapping bit for small packages (28 and 20 pins).
  92. 0: No remap (pin pair PA9/10 mapped on the pins)
  93. 1: Remap (pin pair PA11/12 mapped instead of PA9/10) */
  94. /**
  95. * @}
  96. */
  97. #endif /* SYSCFG_CFGR1_PA11_PA12_RMP */
  98. #if defined(STM32F091xC) || defined(STM32F098xx)
  99. /** @defgroup HAL_IRDA_ENV_SEL HAL IRDA Enveloppe Selection
  100. * @note Applicable on STM32F09x
  101. * @{
  102. */
  103. #define HAL_SYSCFG_IRDA_ENV_SEL_TIM16 (SYSCFG_CFGR1_IRDA_ENV_SEL_0 & SYSCFG_CFGR1_IRDA_ENV_SEL_1) /* 00: Timer16 is selected as IRDA Modulation enveloppe source */
  104. #define HAL_SYSCFG_IRDA_ENV_SEL_USART1 (SYSCFG_CFGR1_IRDA_ENV_SEL_0) /* 01: USART1 is selected as IRDA Modulation enveloppe source */
  105. #define HAL_SYSCFG_IRDA_ENV_SEL_USART4 (SYSCFG_CFGR1_IRDA_ENV_SEL_1) /* 10: USART4 is selected as IRDA Modulation enveloppe source */
  106. /**
  107. * @}
  108. */
  109. #endif /* STM32F091xC || STM32F098xx */
  110. /** @defgroup SYSCFG_FastModePlus_GPIO Fast-mode Plus on GPIO
  111. * @{
  112. */
  113. /** @brief Fast-mode Plus driving capability on a specific GPIO
  114. */
  115. #if defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F042x6) || defined(STM32F048xx) || \
  116. defined(STM32F030x6) || defined(STM32F031x6) || defined(STM32F038xx) || defined(STM32F070x6) || \
  117. defined(STM32F070xB) || defined(STM32F030x6)
  118. #define SYSCFG_FASTMODEPLUS_PA9 SYSCFG_CFGR1_I2C_FMP_PA9 /*!< Enable Fast-mode Plus on PA9 */
  119. #define SYSCFG_FASTMODEPLUS_PA10 SYSCFG_CFGR1_I2C_FMP_PA10 /*!< Enable Fast-mode Plus on PA10 */
  120. #endif
  121. #define SYSCFG_FASTMODEPLUS_PB6 SYSCFG_CFGR1_I2C_FMP_PB6 /*!< Enable Fast-mode Plus on PB6 */
  122. #define SYSCFG_FASTMODEPLUS_PB7 SYSCFG_CFGR1_I2C_FMP_PB7 /*!< Enable Fast-mode Plus on PB7 */
  123. #define SYSCFG_FASTMODEPLUS_PB8 SYSCFG_CFGR1_I2C_FMP_PB8 /*!< Enable Fast-mode Plus on PB8 */
  124. #define SYSCFG_FASTMODEPLUS_PB9 SYSCFG_CFGR1_I2C_FMP_PB9 /*!< Enable Fast-mode Plus on PB9 */
  125. /**
  126. * @}
  127. */
  128. #if defined(STM32F091xC) || defined (STM32F098xx)
  129. /** @defgroup HAL_ISR_Wrapper HAL ISR Wrapper
  130. * @brief ISR Wrapper
  131. * @note applicable on STM32F09x
  132. * @{
  133. */
  134. #define HAL_SYSCFG_ITLINE0 ( 0x00000000U) /*!< Internal define for macro handling */
  135. #define HAL_SYSCFG_ITLINE1 ( 0x00000001U) /*!< Internal define for macro handling */
  136. #define HAL_SYSCFG_ITLINE2 ( 0x00000002U) /*!< Internal define for macro handling */
  137. #define HAL_SYSCFG_ITLINE3 ( 0x00000003U) /*!< Internal define for macro handling */
  138. #define HAL_SYSCFG_ITLINE4 ( 0x00000004U) /*!< Internal define for macro handling */
  139. #define HAL_SYSCFG_ITLINE5 ( 0x00000005U) /*!< Internal define for macro handling */
  140. #define HAL_SYSCFG_ITLINE6 ( 0x00000006U) /*!< Internal define for macro handling */
  141. #define HAL_SYSCFG_ITLINE7 ( 0x00000007U) /*!< Internal define for macro handling */
  142. #define HAL_SYSCFG_ITLINE8 ( 0x00000008U) /*!< Internal define for macro handling */
  143. #define HAL_SYSCFG_ITLINE9 ( 0x00000009U) /*!< Internal define for macro handling */
  144. #define HAL_SYSCFG_ITLINE10 ( 0x0000000AU) /*!< Internal define for macro handling */
  145. #define HAL_SYSCFG_ITLINE11 ( 0x0000000BU) /*!< Internal define for macro handling */
  146. #define HAL_SYSCFG_ITLINE12 ( 0x0000000CU) /*!< Internal define for macro handling */
  147. #define HAL_SYSCFG_ITLINE13 ( 0x0000000DU) /*!< Internal define for macro handling */
  148. #define HAL_SYSCFG_ITLINE14 ( 0x0000000EU) /*!< Internal define for macro handling */
  149. #define HAL_SYSCFG_ITLINE15 ( 0x0000000FU) /*!< Internal define for macro handling */
  150. #define HAL_SYSCFG_ITLINE16 ( 0x00000010U) /*!< Internal define for macro handling */
  151. #define HAL_SYSCFG_ITLINE17 ( 0x00000011U) /*!< Internal define for macro handling */
  152. #define HAL_SYSCFG_ITLINE18 ( 0x00000012U) /*!< Internal define for macro handling */
  153. #define HAL_SYSCFG_ITLINE19 ( 0x00000013U) /*!< Internal define for macro handling */
  154. #define HAL_SYSCFG_ITLINE20 ( 0x00000014U) /*!< Internal define for macro handling */
  155. #define HAL_SYSCFG_ITLINE21 ( 0x00000015U) /*!< Internal define for macro handling */
  156. #define HAL_SYSCFG_ITLINE22 ( 0x00000016U) /*!< Internal define for macro handling */
  157. #define HAL_SYSCFG_ITLINE23 ( 0x00000017U) /*!< Internal define for macro handling */
  158. #define HAL_SYSCFG_ITLINE24 ( 0x00000018U) /*!< Internal define for macro handling */
  159. #define HAL_SYSCFG_ITLINE25 ( 0x00000019U) /*!< Internal define for macro handling */
  160. #define HAL_SYSCFG_ITLINE26 ( 0x0000001AU) /*!< Internal define for macro handling */
  161. #define HAL_SYSCFG_ITLINE27 ( 0x0000001BU) /*!< Internal define for macro handling */
  162. #define HAL_SYSCFG_ITLINE28 ( 0x0000001CU) /*!< Internal define for macro handling */
  163. #define HAL_SYSCFG_ITLINE29 ( 0x0000001DU) /*!< Internal define for macro handling */
  164. #define HAL_SYSCFG_ITLINE30 ( 0x0000001EU) /*!< Internal define for macro handling */
  165. #define HAL_SYSCFG_ITLINE31 ( 0x0000001FU) /*!< Internal define for macro handling */
  166. #define HAL_ITLINE_EWDG ((uint32_t) ((HAL_SYSCFG_ITLINE0 << 0x18U) | SYSCFG_ITLINE0_SR_EWDG)) /*!< EWDG has expired .... */
  167. #if defined(STM32F091xC)
  168. #define HAL_ITLINE_PVDOUT ((uint32_t) ((HAL_SYSCFG_ITLINE1 << 0x18U) | SYSCFG_ITLINE1_SR_PVDOUT)) /*!< Power voltage detection Interrupt .... */
  169. #endif
  170. #define HAL_ITLINE_VDDIO2 ((uint32_t) ((HAL_SYSCFG_ITLINE1 << 0x18U) | SYSCFG_ITLINE1_SR_VDDIO2)) /*!< VDDIO2 Interrupt .... */
  171. #define HAL_ITLINE_RTC_WAKEUP ((uint32_t) ((HAL_SYSCFG_ITLINE2 << 0x18U) | SYSCFG_ITLINE2_SR_RTC_WAKEUP)) /*!< RTC WAKEUP -> exti[20] Interrupt */
  172. #define HAL_ITLINE_RTC_TSTAMP ((uint32_t) ((HAL_SYSCFG_ITLINE2 << 0x18U) | SYSCFG_ITLINE2_SR_RTC_TSTAMP)) /*!< RTC Time Stamp -> exti[19] interrupt */
  173. #define HAL_ITLINE_RTC_ALRA ((uint32_t) ((HAL_SYSCFG_ITLINE2 << 0x18U) | SYSCFG_ITLINE2_SR_RTC_ALRA)) /*!< RTC Alarm -> exti[17] interrupt .... */
  174. #define HAL_ITLINE_FLASH_ITF ((uint32_t) ((HAL_SYSCFG_ITLINE3 << 0x18U) | SYSCFG_ITLINE3_SR_FLASH_ITF)) /*!< Flash ITF Interrupt */
  175. #define HAL_ITLINE_CRS ((uint32_t) ((HAL_SYSCFG_ITLINE4 << 0x18U) | SYSCFG_ITLINE4_SR_CRS)) /*!< CRS Interrupt */
  176. #define HAL_ITLINE_CLK_CTRL ((uint32_t) ((HAL_SYSCFG_ITLINE4 << 0x18U) | SYSCFG_ITLINE4_SR_CLK_CTRL)) /*!< CLK Control Interrupt */
  177. #define HAL_ITLINE_EXTI0 ((uint32_t) ((HAL_SYSCFG_ITLINE5 << 0x18U) | SYSCFG_ITLINE5_SR_EXTI0)) /*!< External Interrupt 0 */
  178. #define HAL_ITLINE_EXTI1 ((uint32_t) ((HAL_SYSCFG_ITLINE5 << 0x18U) | SYSCFG_ITLINE5_SR_EXTI1)) /*!< External Interrupt 1 */
  179. #define HAL_ITLINE_EXTI2 ((uint32_t) ((HAL_SYSCFG_ITLINE6 << 0x18U) | SYSCFG_ITLINE6_SR_EXTI2)) /*!< External Interrupt 2 */
  180. #define HAL_ITLINE_EXTI3 ((uint32_t) ((HAL_SYSCFG_ITLINE6 << 0x18U) | SYSCFG_ITLINE6_SR_EXTI3)) /*!< External Interrupt 3 */
  181. #define HAL_ITLINE_EXTI4 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18U) | SYSCFG_ITLINE7_SR_EXTI4)) /*!< EXTI4 Interrupt */
  182. #define HAL_ITLINE_EXTI5 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18U) | SYSCFG_ITLINE7_SR_EXTI5)) /*!< EXTI5 Interrupt */
  183. #define HAL_ITLINE_EXTI6 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18U) | SYSCFG_ITLINE7_SR_EXTI6)) /*!< EXTI6 Interrupt */
  184. #define HAL_ITLINE_EXTI7 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18U) | SYSCFG_ITLINE7_SR_EXTI7)) /*!< EXTI7 Interrupt */
  185. #define HAL_ITLINE_EXTI8 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18U) | SYSCFG_ITLINE7_SR_EXTI8)) /*!< EXTI8 Interrupt */
  186. #define HAL_ITLINE_EXTI9 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18U) | SYSCFG_ITLINE7_SR_EXTI9)) /*!< EXTI9 Interrupt */
  187. #define HAL_ITLINE_EXTI10 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18U) | SYSCFG_ITLINE7_SR_EXTI10)) /*!< EXTI10 Interrupt */
  188. #define HAL_ITLINE_EXTI11 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18U) | SYSCFG_ITLINE7_SR_EXTI11)) /*!< EXTI11 Interrupt */
  189. #define HAL_ITLINE_EXTI12 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18U) | SYSCFG_ITLINE7_SR_EXTI12)) /*!< EXTI12 Interrupt */
  190. #define HAL_ITLINE_EXTI13 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18U) | SYSCFG_ITLINE7_SR_EXTI13)) /*!< EXTI13 Interrupt */
  191. #define HAL_ITLINE_EXTI14 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18U) | SYSCFG_ITLINE7_SR_EXTI14)) /*!< EXTI14 Interrupt */
  192. #define HAL_ITLINE_EXTI15 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18U) | SYSCFG_ITLINE7_SR_EXTI15)) /*!< EXTI15 Interrupt */
  193. #define HAL_ITLINE_TSC_EOA ((uint32_t) ((HAL_SYSCFG_ITLINE8 << 0x18U) | SYSCFG_ITLINE8_SR_TSC_EOA)) /*!< Touch control EOA Interrupt */
  194. #define HAL_ITLINE_TSC_MCE ((uint32_t) ((HAL_SYSCFG_ITLINE8 << 0x18U) | SYSCFG_ITLINE8_SR_TSC_MCE)) /*!< Touch control MCE Interrupt */
  195. #define HAL_ITLINE_DMA1_CH1 ((uint32_t) ((HAL_SYSCFG_ITLINE9 << 0x18U) | SYSCFG_ITLINE9_SR_DMA1_CH1)) /*!< DMA1 Channel 1 Interrupt */
  196. #define HAL_ITLINE_DMA1_CH2 ((uint32_t) ((HAL_SYSCFG_ITLINE10 << 0x18U) | SYSCFG_ITLINE10_SR_DMA1_CH2)) /*!< DMA1 Channel 2 Interrupt */
  197. #define HAL_ITLINE_DMA1_CH3 ((uint32_t) ((HAL_SYSCFG_ITLINE10 << 0x18U) | SYSCFG_ITLINE10_SR_DMA1_CH3)) /*!< DMA1 Channel 3 Interrupt */
  198. #define HAL_ITLINE_DMA2_CH1 ((uint32_t) ((HAL_SYSCFG_ITLINE10 << 0x18U) | SYSCFG_ITLINE10_SR_DMA2_CH1)) /*!< DMA2 Channel 1 Interrupt */
  199. #define HAL_ITLINE_DMA2_CH2 ((uint32_t) ((HAL_SYSCFG_ITLINE10 << 0x18U) | SYSCFG_ITLINE10_SR_DMA2_CH2)) /*!< DMA2 Channel 2 Interrupt */
  200. #define HAL_ITLINE_DMA1_CH4 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18U) | SYSCFG_ITLINE11_SR_DMA1_CH4)) /*!< DMA1 Channel 4 Interrupt */
  201. #define HAL_ITLINE_DMA1_CH5 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18U) | SYSCFG_ITLINE11_SR_DMA1_CH5)) /*!< DMA1 Channel 5 Interrupt */
  202. #define HAL_ITLINE_DMA1_CH6 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18U) | SYSCFG_ITLINE11_SR_DMA1_CH6)) /*!< DMA1 Channel 6 Interrupt */
  203. #define HAL_ITLINE_DMA1_CH7 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18U) | SYSCFG_ITLINE11_SR_DMA1_CH7)) /*!< DMA1 Channel 7 Interrupt */
  204. #define HAL_ITLINE_DMA2_CH3 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18U) | SYSCFG_ITLINE11_SR_DMA2_CH3)) /*!< DMA2 Channel 3 Interrupt */
  205. #define HAL_ITLINE_DMA2_CH4 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18U) | SYSCFG_ITLINE11_SR_DMA2_CH4)) /*!< DMA2 Channel 4 Interrupt */
  206. #define HAL_ITLINE_DMA2_CH5 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18U) | SYSCFG_ITLINE11_SR_DMA2_CH5)) /*!< DMA2 Channel 5 Interrupt */
  207. #define HAL_ITLINE_ADC ((uint32_t) ((HAL_SYSCFG_ITLINE12 << 0x18U) | SYSCFG_ITLINE12_SR_ADC)) /*!< ADC Interrupt */
  208. #define HAL_ITLINE_COMP1 ((uint32_t) ((HAL_SYSCFG_ITLINE12 << 0x18U) | SYSCFG_ITLINE12_SR_COMP1)) /*!< COMP1 Interrupt -> exti[21] */
  209. #define HAL_ITLINE_COMP2 ((uint32_t) ((HAL_SYSCFG_ITLINE12 << 0x18U) | SYSCFG_ITLINE12_SR_COMP2)) /*!< COMP2 Interrupt -> exti[21] */
  210. #define HAL_ITLINE_TIM1_BRK ((uint32_t) ((HAL_SYSCFG_ITLINE13 << 0x18U) | SYSCFG_ITLINE13_SR_TIM1_BRK)) /*!< TIM1 BRK Interrupt */
  211. #define HAL_ITLINE_TIM1_UPD ((uint32_t) ((HAL_SYSCFG_ITLINE13 << 0x18U) | SYSCFG_ITLINE13_SR_TIM1_UPD)) /*!< TIM1 UPD Interrupt */
  212. #define HAL_ITLINE_TIM1_TRG ((uint32_t) ((HAL_SYSCFG_ITLINE13 << 0x18U) | SYSCFG_ITLINE13_SR_TIM1_TRG)) /*!< TIM1 TRG Interrupt */
  213. #define HAL_ITLINE_TIM1_CCU ((uint32_t) ((HAL_SYSCFG_ITLINE13 << 0x18U) | SYSCFG_ITLINE13_SR_TIM1_CCU)) /*!< TIM1 CCU Interrupt */
  214. #define HAL_ITLINE_TIM1_CC ((uint32_t) ((HAL_SYSCFG_ITLINE14 << 0x18U) | SYSCFG_ITLINE14_SR_TIM1_CC)) /*!< TIM1 CC Interrupt */
  215. #define HAL_ITLINE_TIM2 ((uint32_t) ((HAL_SYSCFG_ITLINE15 << 0x18U) | SYSCFG_ITLINE15_SR_TIM2_GLB)) /*!< TIM2 Interrupt */
  216. #define HAL_ITLINE_TIM3 ((uint32_t) ((HAL_SYSCFG_ITLINE16 << 0x18U) | SYSCFG_ITLINE16_SR_TIM3_GLB)) /*!< TIM3 Interrupt */
  217. #define HAL_ITLINE_DAC ((uint32_t) ((HAL_SYSCFG_ITLINE17 << 0x18U) | SYSCFG_ITLINE17_SR_DAC)) /*!< DAC Interrupt */
  218. #define HAL_ITLINE_TIM6 ((uint32_t) ((HAL_SYSCFG_ITLINE17 << 0x18U) | SYSCFG_ITLINE17_SR_TIM6_GLB)) /*!< TIM6 Interrupt */
  219. #define HAL_ITLINE_TIM7 ((uint32_t) ((HAL_SYSCFG_ITLINE18 << 0x18U) | SYSCFG_ITLINE18_SR_TIM7_GLB)) /*!< TIM7 Interrupt */
  220. #define HAL_ITLINE_TIM14 ((uint32_t) ((HAL_SYSCFG_ITLINE19 << 0x18U) | SYSCFG_ITLINE19_SR_TIM14_GLB)) /*!< TIM14 Interrupt */
  221. #define HAL_ITLINE_TIM15 ((uint32_t) ((HAL_SYSCFG_ITLINE20 << 0x18U) | SYSCFG_ITLINE20_SR_TIM15_GLB)) /*!< TIM15 Interrupt */
  222. #define HAL_ITLINE_TIM16 ((uint32_t) ((HAL_SYSCFG_ITLINE21 << 0x18U) | SYSCFG_ITLINE21_SR_TIM16_GLB)) /*!< TIM16 Interrupt */
  223. #define HAL_ITLINE_TIM17 ((uint32_t) ((HAL_SYSCFG_ITLINE22 << 0x18U) | SYSCFG_ITLINE22_SR_TIM17_GLB)) /*!< TIM17 Interrupt */
  224. #define HAL_ITLINE_I2C1 ((uint32_t) ((HAL_SYSCFG_ITLINE23 << 0x18U) | SYSCFG_ITLINE23_SR_I2C1_GLB)) /*!< I2C1 Interrupt -> exti[23] */
  225. #define HAL_ITLINE_I2C2 ((uint32_t) ((HAL_SYSCFG_ITLINE24 << 0x18U) | SYSCFG_ITLINE24_SR_I2C2_GLB)) /*!< I2C2 Interrupt */
  226. #define HAL_ITLINE_SPI1 ((uint32_t) ((HAL_SYSCFG_ITLINE25 << 0x18U) | SYSCFG_ITLINE25_SR_SPI1)) /*!< I2C1 Interrupt -> exti[23] */
  227. #define HAL_ITLINE_SPI2 ((uint32_t) ((HAL_SYSCFG_ITLINE26 << 0x18U) | SYSCFG_ITLINE26_SR_SPI2)) /*!< SPI1 Interrupt */
  228. #define HAL_ITLINE_USART1 ((uint32_t) ((HAL_SYSCFG_ITLINE27 << 0x18U) | SYSCFG_ITLINE27_SR_USART1_GLB)) /*!< USART1 GLB Interrupt -> exti[25] */
  229. #define HAL_ITLINE_USART2 ((uint32_t) ((HAL_SYSCFG_ITLINE28 << 0x18U) | SYSCFG_ITLINE28_SR_USART2_GLB)) /*!< USART2 GLB Interrupt -> exti[26] */
  230. #define HAL_ITLINE_USART3 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18U) | SYSCFG_ITLINE29_SR_USART3_GLB)) /*!< USART3 Interrupt .... */
  231. #define HAL_ITLINE_USART4 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18U) | SYSCFG_ITLINE29_SR_USART4_GLB)) /*!< USART4 Interrupt .... */
  232. #define HAL_ITLINE_USART5 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18U) | SYSCFG_ITLINE29_SR_USART5_GLB)) /*!< USART5 Interrupt .... */
  233. #define HAL_ITLINE_USART6 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18U) | SYSCFG_ITLINE29_SR_USART6_GLB)) /*!< USART6 Interrupt .... */
  234. #define HAL_ITLINE_USART7 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18U) | SYSCFG_ITLINE29_SR_USART7_GLB)) /*!< USART7 Interrupt .... */
  235. #define HAL_ITLINE_USART8 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18U) | SYSCFG_ITLINE29_SR_USART8_GLB)) /*!< USART8 Interrupt .... */
  236. #define HAL_ITLINE_CAN ((uint32_t) ((HAL_SYSCFG_ITLINE30 << 0x18U) | SYSCFG_ITLINE30_SR_CAN)) /*!< CAN Interrupt */
  237. #define HAL_ITLINE_CEC ((uint32_t) ((HAL_SYSCFG_ITLINE30 << 0x18U) | SYSCFG_ITLINE30_SR_CEC)) /*!< CEC Interrupt -> exti[27] */
  238. /**
  239. * @}
  240. */
  241. #endif /* STM32F091xC || STM32F098xx */
  242. /**
  243. * @}
  244. */
  245. /* Exported macros -----------------------------------------------------------*/
  246. /** @defgroup HAL_Exported_Macros HAL Exported Macros
  247. * @{
  248. */
  249. /** @defgroup HAL_Freeze_Unfreeze_Peripherals HAL Freeze Unfreeze Peripherals
  250. * @brief Freeze/Unfreeze Peripherals in Debug mode
  251. * @{
  252. */
  253. #if defined(DBGMCU_APB1_FZ_DBG_CAN_STOP)
  254. #define __HAL_FREEZE_CAN_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_CAN_STOP))
  255. #define __HAL_UNFREEZE_CAN_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_CAN_STOP))
  256. #endif /* DBGMCU_APB1_FZ_DBG_CAN_STOP */
  257. #if defined(DBGMCU_APB1_FZ_DBG_RTC_STOP)
  258. #define __HAL_DBGMCU_FREEZE_RTC() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_RTC_STOP))
  259. #define __HAL_DBGMCU_UNFREEZE_RTC() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_RTC_STOP))
  260. #endif /* DBGMCU_APB1_FZ_DBG_RTC_STOP */
  261. #if defined(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT)
  262. #define __HAL_DBGMCU_FREEZE_I2C1_TIMEOUT() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))
  263. #define __HAL_DBGMCU_UNFREEZE_I2C1_TIMEOUT() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))
  264. #endif /* DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT */
  265. #if defined(DBGMCU_APB1_FZ_DBG_IWDG_STOP)
  266. #define __HAL_DBGMCU_FREEZE_IWDG() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_IWDG_STOP))
  267. #define __HAL_DBGMCU_UNFREEZE_IWDG() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_IWDG_STOP))
  268. #endif /* DBGMCU_APB1_FZ_DBG_IWDG_STOP */
  269. #if defined(DBGMCU_APB1_FZ_DBG_WWDG_STOP)
  270. #define __HAL_DBGMCU_FREEZE_WWDG() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_WWDG_STOP))
  271. #define __HAL_DBGMCU_UNFREEZE_WWDG() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_WWDG_STOP))
  272. #endif /* DBGMCU_APB1_FZ_DBG_WWDG_STOP */
  273. #if defined(DBGMCU_APB1_FZ_DBG_TIM2_STOP)
  274. #define __HAL_DBGMCU_FREEZE_TIM2() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM2_STOP))
  275. #define __HAL_DBGMCU_UNFREEZE_TIM2() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM2_STOP))
  276. #endif /* DBGMCU_APB1_FZ_DBG_TIM2_STOP */
  277. #if defined(DBGMCU_APB1_FZ_DBG_TIM3_STOP)
  278. #define __HAL_DBGMCU_FREEZE_TIM3() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM3_STOP))
  279. #define __HAL_DBGMCU_UNFREEZE_TIM3() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM3_STOP))
  280. #endif /* DBGMCU_APB1_FZ_DBG_TIM3_STOP */
  281. #if defined(DBGMCU_APB1_FZ_DBG_TIM6_STOP)
  282. #define __HAL_DBGMCU_FREEZE_TIM6() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM6_STOP))
  283. #define __HAL_DBGMCU_UNFREEZE_TIM6() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM6_STOP))
  284. #endif /* DBGMCU_APB1_FZ_DBG_TIM6_STOP */
  285. #if defined(DBGMCU_APB1_FZ_DBG_TIM7_STOP)
  286. #define __HAL_DBGMCU_FREEZE_TIM7() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM7_STOP))
  287. #define __HAL_DBGMCU_UNFREEZE_TIM7() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM7_STOP))
  288. #endif /* DBGMCU_APB1_FZ_DBG_TIM7_STOP */
  289. #if defined(DBGMCU_APB1_FZ_DBG_TIM14_STOP)
  290. #define __HAL_DBGMCU_FREEZE_TIM14() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM14_STOP))
  291. #define __HAL_DBGMCU_UNFREEZE_TIM14() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM14_STOP))
  292. #endif /* DBGMCU_APB1_FZ_DBG_TIM14_STOP */
  293. #if defined(DBGMCU_APB2_FZ_DBG_TIM1_STOP)
  294. #define __HAL_DBGMCU_FREEZE_TIM1() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM1_STOP))
  295. #define __HAL_DBGMCU_UNFREEZE_TIM1() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM1_STOP))
  296. #endif /* DBGMCU_APB2_FZ_DBG_TIM1_STOP */
  297. #if defined(DBGMCU_APB2_FZ_DBG_TIM15_STOP)
  298. #define __HAL_DBGMCU_FREEZE_TIM15() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM15_STOP))
  299. #define __HAL_DBGMCU_UNFREEZE_TIM15() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM15_STOP))
  300. #endif /* DBGMCU_APB2_FZ_DBG_TIM15_STOP */
  301. #if defined(DBGMCU_APB2_FZ_DBG_TIM16_STOP)
  302. #define __HAL_DBGMCU_FREEZE_TIM16() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM16_STOP))
  303. #define __HAL_DBGMCU_UNFREEZE_TIM16() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM16_STOP))
  304. #endif /* DBGMCU_APB2_FZ_DBG_TIM16_STOP */
  305. #if defined(DBGMCU_APB2_FZ_DBG_TIM17_STOP)
  306. #define __HAL_DBGMCU_FREEZE_TIM17() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM17_STOP))
  307. #define __HAL_DBGMCU_UNFREEZE_TIM17() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM17_STOP))
  308. #endif /* DBGMCU_APB2_FZ_DBG_TIM17_STOP */
  309. /**
  310. * @}
  311. */
  312. /** @defgroup Memory_Mapping_Selection Memory Mapping Selection
  313. * @{
  314. */
  315. #if defined(SYSCFG_CFGR1_MEM_MODE)
  316. /** @brief Main Flash memory mapped at 0x00000000
  317. */
  318. #define __HAL_SYSCFG_REMAPMEMORY_FLASH() (SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE))
  319. #endif /* SYSCFG_CFGR1_MEM_MODE */
  320. #if defined(SYSCFG_CFGR1_MEM_MODE_0)
  321. /** @brief System Flash memory mapped at 0x00000000
  322. */
  323. #define __HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE); \
  324. SYSCFG->CFGR1 |= SYSCFG_CFGR1_MEM_MODE_0; \
  325. }while(0)
  326. #endif /* SYSCFG_CFGR1_MEM_MODE_0 */
  327. #if defined(SYSCFG_CFGR1_MEM_MODE_0) && defined(SYSCFG_CFGR1_MEM_MODE_1)
  328. /** @brief Embedded SRAM mapped at 0x00000000
  329. */
  330. #define __HAL_SYSCFG_REMAPMEMORY_SRAM() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE); \
  331. SYSCFG->CFGR1 |= (SYSCFG_CFGR1_MEM_MODE_0 | SYSCFG_CFGR1_MEM_MODE_1); \
  332. }while(0)
  333. #endif /* SYSCFG_CFGR1_MEM_MODE_0 && SYSCFG_CFGR1_MEM_MODE_1 */
  334. /**
  335. * @}
  336. */
  337. #if defined(SYSCFG_CFGR1_PA11_PA12_RMP)
  338. /** @defgroup HAL_Pin_remap HAL Pin remap
  339. * @brief Pin remapping enable/disable macros
  340. * @param __PIN_REMAP__: This parameter can be a value of @ref HAL_Pin_remapping
  341. * @{
  342. */
  343. #define __HAL_REMAP_PIN_ENABLE(__PIN_REMAP__) do {assert_param(IS_HAL_REMAP_PIN((__PIN_REMAP__))); \
  344. SYSCFG->CFGR1 |= (__PIN_REMAP__); \
  345. }while(0)
  346. #define __HAL_REMAP_PIN_DISABLE(__PIN_REMAP__) do {assert_param(IS_HAL_REMAP_PIN((__PIN_REMAP__))); \
  347. SYSCFG->CFGR1 &= ~(__PIN_REMAP__); \
  348. }while(0)
  349. /**
  350. * @}
  351. */
  352. #endif /* SYSCFG_CFGR1_PA11_PA12_RMP */
  353. /** @brief Fast-mode Plus driving capability enable/disable macros
  354. * @param __FASTMODEPLUS__: This parameter can be a value of @ref SYSCFG_FastModePlus_GPIO values.
  355. * That you can find above these macros.
  356. */
  357. #define __HAL_SYSCFG_FASTMODEPLUS_ENABLE(__FASTMODEPLUS__) do {assert_param(IS_SYSCFG_FASTMODEPLUS((__FASTMODEPLUS__)));\
  358. SET_BIT(SYSCFG->CFGR1, (__FASTMODEPLUS__));\
  359. }while(0)
  360. #define __HAL_SYSCFG_FASTMODEPLUS_DISABLE(__FASTMODEPLUS__) do {assert_param(IS_SYSCFG_FASTMODEPLUS((__FASTMODEPLUS__)));\
  361. CLEAR_BIT(SYSCFG->CFGR1, (__FASTMODEPLUS__));\
  362. }while(0)
  363. #if defined(SYSCFG_CFGR2_LOCKUP_LOCK)
  364. /** @defgroup Cortex_Lockup_Enable Cortex Lockup Enable
  365. * @{
  366. */
  367. /** @brief SYSCFG Break Lockup lock
  368. * Enables and locks the connection of Cortex-M0 LOCKUP (Hardfault) output to TIM1/15/16/17 Break input
  369. * @note The selected configuration is locked and can be unlocked by system reset
  370. */
  371. #define __HAL_SYSCFG_BREAK_LOCKUP_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_LOCKUP_LOCK); \
  372. SYSCFG->CFGR2 |= SYSCFG_CFGR2_LOCKUP_LOCK; \
  373. }while(0)
  374. /**
  375. * @}
  376. */
  377. #endif /* SYSCFG_CFGR2_LOCKUP_LOCK */
  378. #if defined(SYSCFG_CFGR2_PVD_LOCK)
  379. /** @defgroup PVD_Lock_Enable PVD Lock
  380. * @{
  381. */
  382. /** @brief SYSCFG Break PVD lock
  383. * Enables and locks the PVD connection with Timer1/8/15/16/17 Break Input, , as well as the PVDE and PLS[2:0] in the PWR_CR register
  384. * @note The selected configuration is locked and can be unlocked by system reset
  385. */
  386. #define __HAL_SYSCFG_BREAK_PVD_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_PVD_LOCK); \
  387. SYSCFG->CFGR2 |= SYSCFG_CFGR2_PVD_LOCK; \
  388. }while(0)
  389. /**
  390. * @}
  391. */
  392. #endif /* SYSCFG_CFGR2_PVD_LOCK */
  393. #if defined(SYSCFG_CFGR2_SRAM_PARITY_LOCK)
  394. /** @defgroup SRAM_Parity_Lock SRAM Parity Lock
  395. * @{
  396. */
  397. /** @brief SYSCFG Break SRAM PARITY lock
  398. * Enables and locks the SRAM_PARITY error signal with Break Input of TIMER1/8/15/16/17
  399. * @note The selected configuration is locked and can be unlocked by system reset
  400. */
  401. #define __HAL_SYSCFG_BREAK_SRAMPARITY_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_SRAM_PARITY_LOCK); \
  402. SYSCFG->CFGR2 |= SYSCFG_CFGR2_SRAM_PARITY_LOCK; \
  403. }while(0)
  404. /**
  405. * @}
  406. */
  407. #endif /* SYSCFG_CFGR2_SRAM_PARITY_LOCK */
  408. #if defined(SYSCFG_CFGR2_SRAM_PEF)
  409. /** @defgroup HAL_SYSCFG_Parity_check_on_RAM HAL SYSCFG Parity check on RAM
  410. * @brief Parity check on RAM disable macro
  411. * @note Disabling the parity check on RAM locks the configuration bit.
  412. * To re-enable the parity check on RAM perform a system reset.
  413. * @{
  414. */
  415. #define __HAL_SYSCFG_RAM_PARITYCHECK_DISABLE() (SYSCFG->CFGR2 |= SYSCFG_CFGR2_SRAM_PEF)
  416. /**
  417. * @}
  418. */
  419. #endif /* SYSCFG_CFGR2_SRAM_PEF */
  420. #if defined(STM32F091xC) || defined (STM32F098xx)
  421. /** @defgroup HAL_ISR_wrapper_check HAL ISR wrapper check
  422. * @brief ISR wrapper check
  423. * @note This feature is applicable on STM32F09x
  424. * @note Allow to determine interrupt source per line.
  425. * @{
  426. */
  427. #define __HAL_GET_PENDING_IT(__SOURCE__) (SYSCFG->IT_LINE_SR[((__SOURCE__) >> 0x18U)] & ((__SOURCE__) & 0x00FFFFFF))
  428. /**
  429. * @}
  430. */
  431. #endif /* (STM32F091xC) || defined (STM32F098xx)*/
  432. #if defined(STM32F091xC) || defined (STM32F098xx)
  433. /** @defgroup HAL_SYSCFG_IRDA_modulation_envelope_selection HAL SYSCFG IRDA modulation envelope selection
  434. * @brief selection of the modulation envelope signal macro, using bits [7:6] of SYS_CTRL(CFGR1) register
  435. * @note This feature is applicable on STM32F09x
  436. * @param __SOURCE__: This parameter can be a value of @ref HAL_IRDA_ENV_SEL
  437. * @{
  438. */
  439. #define __HAL_SYSCFG_IRDA_ENV_SELECTION(__SOURCE__) do {assert_param(IS_HAL_SYSCFG_IRDA_ENV_SEL((__SOURCE__))); \
  440. SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_IRDA_ENV_SEL); \
  441. SYSCFG->CFGR1 |= (__SOURCE__); \
  442. }while(0)
  443. #define __HAL_SYSCFG_GET_IRDA_ENV_SELECTION() ((SYSCFG->CFGR1) & 0x000000C0)
  444. /**
  445. * @}
  446. */
  447. #endif /* (STM32F091xC) || defined (STM32F098xx)*/
  448. /**
  449. * @}
  450. */
  451. /* Exported functions --------------------------------------------------------*/
  452. /** @addtogroup HAL_Exported_Functions
  453. * @{
  454. */
  455. /** @addtogroup HAL_Exported_Functions_Group1
  456. * @{
  457. */
  458. /* Initialization and de-initialization functions ******************************/
  459. HAL_StatusTypeDef HAL_Init(void);
  460. HAL_StatusTypeDef HAL_DeInit(void);
  461. void HAL_MspInit(void);
  462. void HAL_MspDeInit(void);
  463. HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority);
  464. /**
  465. * @}
  466. */
  467. /** @addtogroup HAL_Exported_Functions_Group2
  468. * @{
  469. */
  470. /* Peripheral Control functions ************************************************/
  471. void HAL_IncTick(void);
  472. void HAL_Delay(__IO uint32_t Delay);
  473. uint32_t HAL_GetTick(void);
  474. void HAL_SuspendTick(void);
  475. void HAL_ResumeTick(void);
  476. uint32_t HAL_GetHalVersion(void);
  477. uint32_t HAL_GetREVID(void);
  478. uint32_t HAL_GetDEVID(void);
  479. void HAL_DBGMCU_EnableDBGStopMode(void);
  480. void HAL_DBGMCU_DisableDBGStopMode(void);
  481. void HAL_DBGMCU_EnableDBGStandbyMode(void);
  482. void HAL_DBGMCU_DisableDBGStandbyMode(void);
  483. /**
  484. * @}
  485. */
  486. /**
  487. * @}
  488. */
  489. /**
  490. * @}
  491. */
  492. /**
  493. * @}
  494. */
  495. #ifdef __cplusplus
  496. }
  497. #endif
  498. #endif /* __STM32F0xx_HAL_H */
  499. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/