You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

889 lines
34 KiB

  1. /**
  2. ******************************************************************************
  3. * @file stm32l4xx_hal_pwr_ex.h
  4. * @author MCD Application Team
  5. * @version V1.7.2
  6. * @date 16-June-2017
  7. * @brief Header file of PWR HAL Extended module.
  8. ******************************************************************************
  9. * @attention
  10. *
  11. * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
  12. *
  13. * Redistribution and use in source and binary forms, with or without modification,
  14. * are permitted provided that the following conditions are met:
  15. * 1. Redistributions of source code must retain the above copyright notice,
  16. * this list of conditions and the following disclaimer.
  17. * 2. Redistributions in binary form must reproduce the above copyright notice,
  18. * this list of conditions and the following disclaimer in the documentation
  19. * and/or other materials provided with the distribution.
  20. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  21. * may be used to endorse or promote products derived from this software
  22. * without specific prior written permission.
  23. *
  24. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  25. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  26. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  27. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  28. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  29. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  30. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  31. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  32. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  33. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  34. *
  35. ******************************************************************************
  36. */
  37. /* Define to prevent recursive inclusion -------------------------------------*/
  38. #ifndef __STM32L4xx_HAL_PWR_EX_H
  39. #define __STM32L4xx_HAL_PWR_EX_H
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43. /* Includes ------------------------------------------------------------------*/
  44. #include "stm32l4xx_hal_def.h"
  45. /** @addtogroup STM32L4xx_HAL_Driver
  46. * @{
  47. */
  48. /** @addtogroup PWREx
  49. * @{
  50. */
  51. /* Exported types ------------------------------------------------------------*/
  52. /** @defgroup PWREx_Exported_Types PWR Extended Exported Types
  53. * @{
  54. */
  55. /**
  56. * @brief PWR PVM configuration structure definition
  57. */
  58. typedef struct
  59. {
  60. uint32_t PVMType; /*!< PVMType: Specifies which voltage is monitored and against which threshold.
  61. This parameter can be a value of @ref PWREx_PVM_Type.
  62. @arg @ref PWR_PVM_1 Peripheral Voltage Monitoring 1 enable: VDDUSB versus 1.2 V (applicable when USB feature is supported).
  63. @if STM32L486xx
  64. @arg @ref PWR_PVM_2 Peripheral Voltage Monitoring 2 enable: VDDIO2 versus 0.9 V (applicable when VDDIO2 is present on device).
  65. @endif
  66. @arg @ref PWR_PVM_3 Peripheral Voltage Monitoring 3 enable: VDDA versus 1.62 V.
  67. @arg @ref PWR_PVM_4 Peripheral Voltage Monitoring 4 enable: VDDA versus 2.2 V. */
  68. uint32_t Mode; /*!< Mode: Specifies the operating mode for the selected pins.
  69. This parameter can be a value of @ref PWREx_PVM_Mode. */
  70. }PWR_PVMTypeDef;
  71. /**
  72. * @}
  73. */
  74. /* Exported constants --------------------------------------------------------*/
  75. /** @defgroup PWREx_Exported_Constants PWR Extended Exported Constants
  76. * @{
  77. */
  78. /** @defgroup PWREx_WUP_Polarity Shift to apply to retrieve polarity information from PWR_WAKEUP_PINy_xxx constants
  79. * @{
  80. */
  81. #define PWR_WUP_POLARITY_SHIFT 0x05 /*!< Internal constant used to retrieve wakeup pin polariry */
  82. /**
  83. * @}
  84. */
  85. /** @defgroup PWREx_WakeUp_Pins PWR wake-up pins
  86. * @{
  87. */
  88. #define PWR_WAKEUP_PIN1 PWR_CR3_EWUP1 /*!< Wakeup pin 1 (with high level polarity) */
  89. #define PWR_WAKEUP_PIN2 PWR_CR3_EWUP2 /*!< Wakeup pin 2 (with high level polarity) */
  90. #define PWR_WAKEUP_PIN3 PWR_CR3_EWUP3 /*!< Wakeup pin 3 (with high level polarity) */
  91. #define PWR_WAKEUP_PIN4 PWR_CR3_EWUP4 /*!< Wakeup pin 4 (with high level polarity) */
  92. #define PWR_WAKEUP_PIN5 PWR_CR3_EWUP5 /*!< Wakeup pin 5 (with high level polarity) */
  93. #define PWR_WAKEUP_PIN1_HIGH PWR_CR3_EWUP1 /*!< Wakeup pin 1 (with high level polarity) */
  94. #define PWR_WAKEUP_PIN2_HIGH PWR_CR3_EWUP2 /*!< Wakeup pin 2 (with high level polarity) */
  95. #define PWR_WAKEUP_PIN3_HIGH PWR_CR3_EWUP3 /*!< Wakeup pin 3 (with high level polarity) */
  96. #define PWR_WAKEUP_PIN4_HIGH PWR_CR3_EWUP4 /*!< Wakeup pin 4 (with high level polarity) */
  97. #define PWR_WAKEUP_PIN5_HIGH PWR_CR3_EWUP5 /*!< Wakeup pin 5 (with high level polarity) */
  98. #define PWR_WAKEUP_PIN1_LOW (uint32_t)((PWR_CR4_WP1<<PWR_WUP_POLARITY_SHIFT) | PWR_CR3_EWUP1) /*!< Wakeup pin 1 (with low level polarity) */
  99. #define PWR_WAKEUP_PIN2_LOW (uint32_t)((PWR_CR4_WP2<<PWR_WUP_POLARITY_SHIFT) | PWR_CR3_EWUP2) /*!< Wakeup pin 2 (with low level polarity) */
  100. #define PWR_WAKEUP_PIN3_LOW (uint32_t)((PWR_CR4_WP3<<PWR_WUP_POLARITY_SHIFT) | PWR_CR3_EWUP3) /*!< Wakeup pin 3 (with low level polarity) */
  101. #define PWR_WAKEUP_PIN4_LOW (uint32_t)((PWR_CR4_WP4<<PWR_WUP_POLARITY_SHIFT) | PWR_CR3_EWUP4) /*!< Wakeup pin 4 (with low level polarity) */
  102. #define PWR_WAKEUP_PIN5_LOW (uint32_t)((PWR_CR4_WP5<<PWR_WUP_POLARITY_SHIFT) | PWR_CR3_EWUP5) /*!< Wakeup pin 5 (with low level polarity) */
  103. /**
  104. * @}
  105. */
  106. /** @defgroup PWREx_PVM_Type Peripheral Voltage Monitoring type
  107. * @{
  108. */
  109. #if defined(PWR_CR2_PVME1)
  110. #define PWR_PVM_1 PWR_CR2_PVME1 /*!< Peripheral Voltage Monitoring 1 enable: VDDUSB versus 1.2 V (applicable when USB feature is supported) */
  111. #endif /* PWR_CR2_PVME1 */
  112. #if defined(PWR_CR2_PVME2)
  113. #define PWR_PVM_2 PWR_CR2_PVME2 /*!< Peripheral Voltage Monitoring 2 enable: VDDIO2 versus 0.9 V (applicable when VDDIO2 is present on device) */
  114. #endif /* PWR_CR2_PVME2 */
  115. #define PWR_PVM_3 PWR_CR2_PVME3 /*!< Peripheral Voltage Monitoring 3 enable: VDDA versus 1.62 V */
  116. #define PWR_PVM_4 PWR_CR2_PVME4 /*!< Peripheral Voltage Monitoring 4 enable: VDDA versus 2.2 V */
  117. /**
  118. * @}
  119. */
  120. /** @defgroup PWREx_PVM_Mode PWR PVM interrupt and event mode
  121. * @{
  122. */
  123. #define PWR_PVM_MODE_NORMAL ((uint32_t)0x00000000) /*!< basic mode is used */
  124. #define PWR_PVM_MODE_IT_RISING ((uint32_t)0x00010001) /*!< External Interrupt Mode with Rising edge trigger detection */
  125. #define PWR_PVM_MODE_IT_FALLING ((uint32_t)0x00010002) /*!< External Interrupt Mode with Falling edge trigger detection */
  126. #define PWR_PVM_MODE_IT_RISING_FALLING ((uint32_t)0x00010003) /*!< External Interrupt Mode with Rising/Falling edge trigger detection */
  127. #define PWR_PVM_MODE_EVENT_RISING ((uint32_t)0x00020001) /*!< Event Mode with Rising edge trigger detection */
  128. #define PWR_PVM_MODE_EVENT_FALLING ((uint32_t)0x00020002) /*!< Event Mode with Falling edge trigger detection */
  129. #define PWR_PVM_MODE_EVENT_RISING_FALLING ((uint32_t)0x00020003) /*!< Event Mode with Rising/Falling edge trigger detection */
  130. /**
  131. * @}
  132. */
  133. /** @defgroup PWREx_Regulator_Voltage_Scale PWR Regulator voltage scale
  134. * @{
  135. */
  136. #define PWR_REGULATOR_VOLTAGE_SCALE1 PWR_CR1_VOS_0 /*!< Voltage scaling range 1 */
  137. #define PWR_REGULATOR_VOLTAGE_SCALE2 PWR_CR1_VOS_1 /*!< Voltage scaling range 2 */
  138. /**
  139. * @}
  140. */
  141. /** @defgroup PWREx_VBAT_Battery_Charging_Selection PWR battery charging resistor selection
  142. * @{
  143. */
  144. #define PWR_BATTERY_CHARGING_RESISTOR_5 ((uint32_t)0x00000000) /*!< VBAT charging through a 5 kOhms resistor */
  145. #define PWR_BATTERY_CHARGING_RESISTOR_1_5 PWR_CR4_VBRS /*!< VBAT charging through a 1.5 kOhms resistor */
  146. /**
  147. * @}
  148. */
  149. /** @defgroup PWREx_VBAT_Battery_Charging PWR battery charging
  150. * @{
  151. */
  152. #define PWR_BATTERY_CHARGING_DISABLE ((uint32_t)0x00000000)
  153. #define PWR_BATTERY_CHARGING_ENABLE PWR_CR4_VBE
  154. /**
  155. * @}
  156. */
  157. /** @defgroup PWREx_GPIO_Bit_Number GPIO bit number for I/O setting in standby/shutdown mode
  158. * @{
  159. */
  160. #define PWR_GPIO_BIT_0 PWR_PUCRA_PA0 /*!< GPIO port I/O pin 0 */
  161. #define PWR_GPIO_BIT_1 PWR_PUCRA_PA1 /*!< GPIO port I/O pin 1 */
  162. #define PWR_GPIO_BIT_2 PWR_PUCRA_PA2 /*!< GPIO port I/O pin 2 */
  163. #define PWR_GPIO_BIT_3 PWR_PUCRA_PA3 /*!< GPIO port I/O pin 3 */
  164. #define PWR_GPIO_BIT_4 PWR_PUCRA_PA4 /*!< GPIO port I/O pin 4 */
  165. #define PWR_GPIO_BIT_5 PWR_PUCRA_PA5 /*!< GPIO port I/O pin 5 */
  166. #define PWR_GPIO_BIT_6 PWR_PUCRA_PA6 /*!< GPIO port I/O pin 6 */
  167. #define PWR_GPIO_BIT_7 PWR_PUCRA_PA7 /*!< GPIO port I/O pin 7 */
  168. #define PWR_GPIO_BIT_8 PWR_PUCRA_PA8 /*!< GPIO port I/O pin 8 */
  169. #define PWR_GPIO_BIT_9 PWR_PUCRA_PA9 /*!< GPIO port I/O pin 9 */
  170. #define PWR_GPIO_BIT_10 PWR_PUCRA_PA10 /*!< GPIO port I/O pin 10 */
  171. #define PWR_GPIO_BIT_11 PWR_PUCRA_PA11 /*!< GPIO port I/O pin 11 */
  172. #define PWR_GPIO_BIT_12 PWR_PUCRA_PA12 /*!< GPIO port I/O pin 12 */
  173. #define PWR_GPIO_BIT_13 PWR_PUCRA_PA13 /*!< GPIO port I/O pin 13 */
  174. #define PWR_GPIO_BIT_14 PWR_PDCRA_PA14 /*!< GPIO port I/O pin 14 */
  175. #define PWR_GPIO_BIT_15 PWR_PUCRA_PA15 /*!< GPIO port I/O pin 15 */
  176. /**
  177. * @}
  178. */
  179. /** @defgroup PWREx_GPIO GPIO port
  180. * @{
  181. */
  182. #define PWR_GPIO_A 0x00000000 /*!< GPIO port A */
  183. #define PWR_GPIO_B 0x00000001 /*!< GPIO port B */
  184. #define PWR_GPIO_C 0x00000002 /*!< GPIO port C */
  185. #if defined(GPIOD_BASE)
  186. #define PWR_GPIO_D 0x00000003 /*!< GPIO port D */
  187. #endif
  188. #if defined(GPIOE_BASE)
  189. #define PWR_GPIO_E 0x00000004 /*!< GPIO port E */
  190. #endif
  191. #if defined(GPIOF_BASE)
  192. #define PWR_GPIO_F 0x00000005 /*!< GPIO port F */
  193. #endif
  194. #if defined(GPIOG_BASE)
  195. #define PWR_GPIO_G 0x00000006 /*!< GPIO port G */
  196. #endif
  197. #define PWR_GPIO_H 0x00000007 /*!< GPIO port H */
  198. #if defined(GPIOI_BASE)
  199. #define PWR_GPIO_I 0x00000008 /*!< GPIO port I */
  200. #endif
  201. /**
  202. * @}
  203. */
  204. /** @defgroup PWREx_PVM_EXTI_LINE PWR PVM external interrupts lines
  205. * @{
  206. */
  207. #if defined(PWR_CR2_PVME1)
  208. #define PWR_EXTI_LINE_PVM1 ((uint32_t)0x00000008) /*!< External interrupt line 35 Connected to the PVM1 EXTI Line */
  209. #endif /* PWR_CR2_PVME1 */
  210. #if defined(PWR_CR2_PVME2)
  211. #define PWR_EXTI_LINE_PVM2 ((uint32_t)0x00000010) /*!< External interrupt line 36 Connected to the PVM2 EXTI Line */
  212. #endif /* PWR_CR2_PVME2 */
  213. #define PWR_EXTI_LINE_PVM3 ((uint32_t)0x00000020) /*!< External interrupt line 37 Connected to the PVM3 EXTI Line */
  214. #define PWR_EXTI_LINE_PVM4 ((uint32_t)0x00000040) /*!< External interrupt line 38 Connected to the PVM4 EXTI Line */
  215. /**
  216. * @}
  217. */
  218. /** @defgroup PWREx_PVM_EVENT_LINE PWR PVM event lines
  219. * @{
  220. */
  221. #if defined(PWR_CR2_PVME1)
  222. #define PWR_EVENT_LINE_PVM1 ((uint32_t)0x00000008) /*!< Event line 35 Connected to the PVM1 EXTI Line */
  223. #endif /* PWR_CR2_PVME1 */
  224. #if defined(PWR_CR2_PVME2)
  225. #define PWR_EVENT_LINE_PVM2 ((uint32_t)0x00000010) /*!< Event line 36 Connected to the PVM2 EXTI Line */
  226. #endif /* PWR_CR2_PVME2 */
  227. #define PWR_EVENT_LINE_PVM3 ((uint32_t)0x00000020) /*!< Event line 37 Connected to the PVM3 EXTI Line */
  228. #define PWR_EVENT_LINE_PVM4 ((uint32_t)0x00000040) /*!< Event line 38 Connected to the PVM4 EXTI Line */
  229. /**
  230. * @}
  231. */
  232. /** @defgroup PWREx_Flag PWR Status Flags
  233. * Elements values convention: 0000 0000 0XXY YYYYb
  234. * - Y YYYY : Flag position in the XX register (5 bits)
  235. * - XX : Status register (2 bits)
  236. * - 01: SR1 register
  237. * - 10: SR2 register
  238. * The only exception is PWR_FLAG_WU, encompassing all
  239. * wake-up flags and set to PWR_SR1_WUF.
  240. * @{
  241. */
  242. #define PWR_FLAG_WUF1 ((uint32_t)0x0020) /*!< Wakeup event on wakeup pin 1 */
  243. #define PWR_FLAG_WUF2 ((uint32_t)0x0021) /*!< Wakeup event on wakeup pin 2 */
  244. #define PWR_FLAG_WUF3 ((uint32_t)0x0022) /*!< Wakeup event on wakeup pin 3 */
  245. #define PWR_FLAG_WUF4 ((uint32_t)0x0023) /*!< Wakeup event on wakeup pin 4 */
  246. #define PWR_FLAG_WUF5 ((uint32_t)0x0024) /*!< Wakeup event on wakeup pin 5 */
  247. #define PWR_FLAG_WU PWR_SR1_WUF /*!< Encompass wakeup event on all wakeup pins */
  248. #define PWR_FLAG_SB ((uint32_t)0x0028) /*!< Standby flag */
  249. #define PWR_FLAG_WUFI ((uint32_t)0x002F) /*!< Wakeup on internal wakeup line */
  250. #define PWR_FLAG_REGLPS ((uint32_t)0x0048) /*!< Low-power regulator start flag */
  251. #define PWR_FLAG_REGLPF ((uint32_t)0x0049) /*!< Low-power regulator flag */
  252. #define PWR_FLAG_VOSF ((uint32_t)0x004A) /*!< Voltage scaling flag */
  253. #define PWR_FLAG_PVDO ((uint32_t)0x004B) /*!< Power Voltage Detector output flag */
  254. #if defined(PWR_CR2_PVME1)
  255. #define PWR_FLAG_PVMO1 ((uint32_t)0x004C) /*!< Power Voltage Monitoring 1 output flag */
  256. #endif /* PWR_CR2_PVME1 */
  257. #if defined(PWR_CR2_PVME2)
  258. #define PWR_FLAG_PVMO2 ((uint32_t)0x004D) /*!< Power Voltage Monitoring 2 output flag */
  259. #endif /* PWR_CR2_PVME2 */
  260. #define PWR_FLAG_PVMO3 ((uint32_t)0x004E) /*!< Power Voltage Monitoring 3 output flag */
  261. #define PWR_FLAG_PVMO4 ((uint32_t)0x004F) /*!< Power Voltage Monitoring 4 output flag */
  262. /**
  263. * @}
  264. */
  265. /**
  266. * @}
  267. */
  268. /* Exported macros -----------------------------------------------------------*/
  269. /** @defgroup PWREx_Exported_Macros PWR Extended Exported Macros
  270. * @{
  271. */
  272. #if defined(PWR_CR2_PVME1)
  273. /**
  274. * @brief Enable the PVM1 Extended Interrupt Line.
  275. * @retval None
  276. */
  277. #define __HAL_PWR_PVM1_EXTI_ENABLE_IT() SET_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM1)
  278. /**
  279. * @brief Disable the PVM1 Extended Interrupt Line.
  280. * @retval None
  281. */
  282. #define __HAL_PWR_PVM1_EXTI_DISABLE_IT() CLEAR_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM1)
  283. /**
  284. * @brief Enable the PVM1 Event Line.
  285. * @retval None
  286. */
  287. #define __HAL_PWR_PVM1_EXTI_ENABLE_EVENT() SET_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM1)
  288. /**
  289. * @brief Disable the PVM1 Event Line.
  290. * @retval None
  291. */
  292. #define __HAL_PWR_PVM1_EXTI_DISABLE_EVENT() CLEAR_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM1)
  293. /**
  294. * @brief Enable the PVM1 Extended Interrupt Rising Trigger.
  295. * @retval None
  296. */
  297. #define __HAL_PWR_PVM1_EXTI_ENABLE_RISING_EDGE() SET_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM1)
  298. /**
  299. * @brief Disable the PVM1 Extended Interrupt Rising Trigger.
  300. * @retval None
  301. */
  302. #define __HAL_PWR_PVM1_EXTI_DISABLE_RISING_EDGE() CLEAR_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM1)
  303. /**
  304. * @brief Enable the PVM1 Extended Interrupt Falling Trigger.
  305. * @retval None
  306. */
  307. #define __HAL_PWR_PVM1_EXTI_ENABLE_FALLING_EDGE() SET_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM1)
  308. /**
  309. * @brief Disable the PVM1 Extended Interrupt Falling Trigger.
  310. * @retval None
  311. */
  312. #define __HAL_PWR_PVM1_EXTI_DISABLE_FALLING_EDGE() CLEAR_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM1)
  313. /**
  314. * @brief PVM1 EXTI line configuration: set rising & falling edge trigger.
  315. * @retval None
  316. */
  317. #define __HAL_PWR_PVM1_EXTI_ENABLE_RISING_FALLING_EDGE() \
  318. do { \
  319. __HAL_PWR_PVM1_EXTI_ENABLE_RISING_EDGE(); \
  320. __HAL_PWR_PVM1_EXTI_ENABLE_FALLING_EDGE(); \
  321. } while(0)
  322. /**
  323. * @brief Disable the PVM1 Extended Interrupt Rising & Falling Trigger.
  324. * @retval None
  325. */
  326. #define __HAL_PWR_PVM1_EXTI_DISABLE_RISING_FALLING_EDGE() \
  327. do { \
  328. __HAL_PWR_PVM1_EXTI_DISABLE_RISING_EDGE(); \
  329. __HAL_PWR_PVM1_EXTI_DISABLE_FALLING_EDGE(); \
  330. } while(0)
  331. /**
  332. * @brief Generate a Software interrupt on selected EXTI line.
  333. * @retval None
  334. */
  335. #define __HAL_PWR_PVM1_EXTI_GENERATE_SWIT() SET_BIT(EXTI->SWIER2, PWR_EXTI_LINE_PVM1)
  336. /**
  337. * @brief Check whether the specified PVM1 EXTI interrupt flag is set or not.
  338. * @retval EXTI PVM1 Line Status.
  339. */
  340. #define __HAL_PWR_PVM1_EXTI_GET_FLAG() (EXTI->PR2 & PWR_EXTI_LINE_PVM1)
  341. /**
  342. * @brief Clear the PVM1 EXTI flag.
  343. * @retval None
  344. */
  345. #define __HAL_PWR_PVM1_EXTI_CLEAR_FLAG() WRITE_REG(EXTI->PR2, PWR_EXTI_LINE_PVM1)
  346. #endif /* PWR_CR2_PVME1 */
  347. #if defined(PWR_CR2_PVME2)
  348. /**
  349. * @brief Enable the PVM2 Extended Interrupt Line.
  350. * @retval None
  351. */
  352. #define __HAL_PWR_PVM2_EXTI_ENABLE_IT() SET_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM2)
  353. /**
  354. * @brief Disable the PVM2 Extended Interrupt Line.
  355. * @retval None
  356. */
  357. #define __HAL_PWR_PVM2_EXTI_DISABLE_IT() CLEAR_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM2)
  358. /**
  359. * @brief Enable the PVM2 Event Line.
  360. * @retval None
  361. */
  362. #define __HAL_PWR_PVM2_EXTI_ENABLE_EVENT() SET_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM2)
  363. /**
  364. * @brief Disable the PVM2 Event Line.
  365. * @retval None
  366. */
  367. #define __HAL_PWR_PVM2_EXTI_DISABLE_EVENT() CLEAR_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM2)
  368. /**
  369. * @brief Enable the PVM2 Extended Interrupt Rising Trigger.
  370. * @retval None
  371. */
  372. #define __HAL_PWR_PVM2_EXTI_ENABLE_RISING_EDGE() SET_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM2)
  373. /**
  374. * @brief Disable the PVM2 Extended Interrupt Rising Trigger.
  375. * @retval None
  376. */
  377. #define __HAL_PWR_PVM2_EXTI_DISABLE_RISING_EDGE() CLEAR_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM2)
  378. /**
  379. * @brief Enable the PVM2 Extended Interrupt Falling Trigger.
  380. * @retval None
  381. */
  382. #define __HAL_PWR_PVM2_EXTI_ENABLE_FALLING_EDGE() SET_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM2)
  383. /**
  384. * @brief Disable the PVM2 Extended Interrupt Falling Trigger.
  385. * @retval None
  386. */
  387. #define __HAL_PWR_PVM2_EXTI_DISABLE_FALLING_EDGE() CLEAR_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM2)
  388. /**
  389. * @brief PVM2 EXTI line configuration: set rising & falling edge trigger.
  390. * @retval None
  391. */
  392. #define __HAL_PWR_PVM2_EXTI_ENABLE_RISING_FALLING_EDGE() \
  393. do { \
  394. __HAL_PWR_PVM2_EXTI_ENABLE_RISING_EDGE(); \
  395. __HAL_PWR_PVM2_EXTI_ENABLE_FALLING_EDGE(); \
  396. } while(0)
  397. /**
  398. * @brief Disable the PVM2 Extended Interrupt Rising & Falling Trigger.
  399. * @retval None
  400. */
  401. #define __HAL_PWR_PVM2_EXTI_DISABLE_RISING_FALLING_EDGE() \
  402. do { \
  403. __HAL_PWR_PVM2_EXTI_DISABLE_RISING_EDGE(); \
  404. __HAL_PWR_PVM2_EXTI_DISABLE_FALLING_EDGE(); \
  405. } while(0)
  406. /**
  407. * @brief Generate a Software interrupt on selected EXTI line.
  408. * @retval None
  409. */
  410. #define __HAL_PWR_PVM2_EXTI_GENERATE_SWIT() SET_BIT(EXTI->SWIER2, PWR_EXTI_LINE_PVM2)
  411. /**
  412. * @brief Check whether the specified PVM2 EXTI interrupt flag is set or not.
  413. * @retval EXTI PVM2 Line Status.
  414. */
  415. #define __HAL_PWR_PVM2_EXTI_GET_FLAG() (EXTI->PR2 & PWR_EXTI_LINE_PVM2)
  416. /**
  417. * @brief Clear the PVM2 EXTI flag.
  418. * @retval None
  419. */
  420. #define __HAL_PWR_PVM2_EXTI_CLEAR_FLAG() WRITE_REG(EXTI->PR2, PWR_EXTI_LINE_PVM2)
  421. #endif /* PWR_CR2_PVME2 */
  422. /**
  423. * @brief Enable the PVM3 Extended Interrupt Line.
  424. * @retval None
  425. */
  426. #define __HAL_PWR_PVM3_EXTI_ENABLE_IT() SET_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM3)
  427. /**
  428. * @brief Disable the PVM3 Extended Interrupt Line.
  429. * @retval None
  430. */
  431. #define __HAL_PWR_PVM3_EXTI_DISABLE_IT() CLEAR_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM3)
  432. /**
  433. * @brief Enable the PVM3 Event Line.
  434. * @retval None
  435. */
  436. #define __HAL_PWR_PVM3_EXTI_ENABLE_EVENT() SET_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM3)
  437. /**
  438. * @brief Disable the PVM3 Event Line.
  439. * @retval None
  440. */
  441. #define __HAL_PWR_PVM3_EXTI_DISABLE_EVENT() CLEAR_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM3)
  442. /**
  443. * @brief Enable the PVM3 Extended Interrupt Rising Trigger.
  444. * @retval None
  445. */
  446. #define __HAL_PWR_PVM3_EXTI_ENABLE_RISING_EDGE() SET_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM3)
  447. /**
  448. * @brief Disable the PVM3 Extended Interrupt Rising Trigger.
  449. * @retval None
  450. */
  451. #define __HAL_PWR_PVM3_EXTI_DISABLE_RISING_EDGE() CLEAR_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM3)
  452. /**
  453. * @brief Enable the PVM3 Extended Interrupt Falling Trigger.
  454. * @retval None
  455. */
  456. #define __HAL_PWR_PVM3_EXTI_ENABLE_FALLING_EDGE() SET_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM3)
  457. /**
  458. * @brief Disable the PVM3 Extended Interrupt Falling Trigger.
  459. * @retval None
  460. */
  461. #define __HAL_PWR_PVM3_EXTI_DISABLE_FALLING_EDGE() CLEAR_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM3)
  462. /**
  463. * @brief PVM3 EXTI line configuration: set rising & falling edge trigger.
  464. * @retval None
  465. */
  466. #define __HAL_PWR_PVM3_EXTI_ENABLE_RISING_FALLING_EDGE() \
  467. do { \
  468. __HAL_PWR_PVM3_EXTI_ENABLE_RISING_EDGE(); \
  469. __HAL_PWR_PVM3_EXTI_ENABLE_FALLING_EDGE(); \
  470. } while(0)
  471. /**
  472. * @brief Disable the PVM3 Extended Interrupt Rising & Falling Trigger.
  473. * @retval None
  474. */
  475. #define __HAL_PWR_PVM3_EXTI_DISABLE_RISING_FALLING_EDGE() \
  476. do { \
  477. __HAL_PWR_PVM3_EXTI_DISABLE_RISING_EDGE(); \
  478. __HAL_PWR_PVM3_EXTI_DISABLE_FALLING_EDGE(); \
  479. } while(0)
  480. /**
  481. * @brief Generate a Software interrupt on selected EXTI line.
  482. * @retval None
  483. */
  484. #define __HAL_PWR_PVM3_EXTI_GENERATE_SWIT() SET_BIT(EXTI->SWIER2, PWR_EXTI_LINE_PVM3)
  485. /**
  486. * @brief Check whether the specified PVM3 EXTI interrupt flag is set or not.
  487. * @retval EXTI PVM3 Line Status.
  488. */
  489. #define __HAL_PWR_PVM3_EXTI_GET_FLAG() (EXTI->PR2 & PWR_EXTI_LINE_PVM3)
  490. /**
  491. * @brief Clear the PVM3 EXTI flag.
  492. * @retval None
  493. */
  494. #define __HAL_PWR_PVM3_EXTI_CLEAR_FLAG() WRITE_REG(EXTI->PR2, PWR_EXTI_LINE_PVM3)
  495. /**
  496. * @brief Enable the PVM4 Extended Interrupt Line.
  497. * @retval None
  498. */
  499. #define __HAL_PWR_PVM4_EXTI_ENABLE_IT() SET_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM4)
  500. /**
  501. * @brief Disable the PVM4 Extended Interrupt Line.
  502. * @retval None
  503. */
  504. #define __HAL_PWR_PVM4_EXTI_DISABLE_IT() CLEAR_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM4)
  505. /**
  506. * @brief Enable the PVM4 Event Line.
  507. * @retval None
  508. */
  509. #define __HAL_PWR_PVM4_EXTI_ENABLE_EVENT() SET_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM4)
  510. /**
  511. * @brief Disable the PVM4 Event Line.
  512. * @retval None
  513. */
  514. #define __HAL_PWR_PVM4_EXTI_DISABLE_EVENT() CLEAR_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM4)
  515. /**
  516. * @brief Enable the PVM4 Extended Interrupt Rising Trigger.
  517. * @retval None
  518. */
  519. #define __HAL_PWR_PVM4_EXTI_ENABLE_RISING_EDGE() SET_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM4)
  520. /**
  521. * @brief Disable the PVM4 Extended Interrupt Rising Trigger.
  522. * @retval None
  523. */
  524. #define __HAL_PWR_PVM4_EXTI_DISABLE_RISING_EDGE() CLEAR_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM4)
  525. /**
  526. * @brief Enable the PVM4 Extended Interrupt Falling Trigger.
  527. * @retval None
  528. */
  529. #define __HAL_PWR_PVM4_EXTI_ENABLE_FALLING_EDGE() SET_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM4)
  530. /**
  531. * @brief Disable the PVM4 Extended Interrupt Falling Trigger.
  532. * @retval None
  533. */
  534. #define __HAL_PWR_PVM4_EXTI_DISABLE_FALLING_EDGE() CLEAR_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM4)
  535. /**
  536. * @brief PVM4 EXTI line configuration: set rising & falling edge trigger.
  537. * @retval None
  538. */
  539. #define __HAL_PWR_PVM4_EXTI_ENABLE_RISING_FALLING_EDGE() \
  540. do { \
  541. __HAL_PWR_PVM4_EXTI_ENABLE_RISING_EDGE(); \
  542. __HAL_PWR_PVM4_EXTI_ENABLE_FALLING_EDGE(); \
  543. } while(0)
  544. /**
  545. * @brief Disable the PVM4 Extended Interrupt Rising & Falling Trigger.
  546. * @retval None
  547. */
  548. #define __HAL_PWR_PVM4_EXTI_DISABLE_RISING_FALLING_EDGE() \
  549. do { \
  550. __HAL_PWR_PVM4_EXTI_DISABLE_RISING_EDGE(); \
  551. __HAL_PWR_PVM4_EXTI_DISABLE_FALLING_EDGE(); \
  552. } while(0)
  553. /**
  554. * @brief Generate a Software interrupt on selected EXTI line.
  555. * @retval None
  556. */
  557. #define __HAL_PWR_PVM4_EXTI_GENERATE_SWIT() SET_BIT(EXTI->SWIER2, PWR_EXTI_LINE_PVM4)
  558. /**
  559. * @brief Check whether or not the specified PVM4 EXTI interrupt flag is set.
  560. * @retval EXTI PVM4 Line Status.
  561. */
  562. #define __HAL_PWR_PVM4_EXTI_GET_FLAG() (EXTI->PR2 & PWR_EXTI_LINE_PVM4)
  563. /**
  564. * @brief Clear the PVM4 EXTI flag.
  565. * @retval None
  566. */
  567. #define __HAL_PWR_PVM4_EXTI_CLEAR_FLAG() WRITE_REG(EXTI->PR2, PWR_EXTI_LINE_PVM4)
  568. /**
  569. * @brief Configure the main internal regulator output voltage.
  570. * @param __REGULATOR__: specifies the regulator output voltage to achieve
  571. * a tradeoff between performance and power consumption.
  572. * This parameter can be one of the following values:
  573. * @arg @ref PWR_REGULATOR_VOLTAGE_SCALE1 Regulator voltage output range 1 mode,
  574. * typical output voltage at 1.2 V,
  575. * system frequency up to 80 MHz.
  576. * @arg @ref PWR_REGULATOR_VOLTAGE_SCALE2 Regulator voltage output range 2 mode,
  577. * typical output voltage at 1.0 V,
  578. * system frequency up to 26 MHz.
  579. * @note This macro is similar to HAL_PWREx_ControlVoltageScaling() API but doesn't check
  580. * whether or not VOSF flag is cleared when moving from range 2 to range 1. User
  581. * may resort to __HAL_PWR_GET_FLAG() macro to check VOSF bit resetting.
  582. * @retval None
  583. */
  584. #define __HAL_PWR_VOLTAGESCALING_CONFIG(__REGULATOR__) do { \
  585. __IO uint32_t tmpreg; \
  586. MODIFY_REG(PWR->CR1, PWR_CR1_VOS, (__REGULATOR__)); \
  587. /* Delay after an RCC peripheral clock enabling */ \
  588. tmpreg = READ_BIT(PWR->CR1, PWR_CR1_VOS); \
  589. UNUSED(tmpreg); \
  590. } while(0)
  591. /**
  592. * @}
  593. */
  594. /* Private macros --------------------------------------------------------*/
  595. /** @addtogroup PWREx_Private_Macros PWR Extended Private Macros
  596. * @{
  597. */
  598. #define IS_PWR_WAKEUP_PIN(PIN) (((PIN) == PWR_WAKEUP_PIN1) || \
  599. ((PIN) == PWR_WAKEUP_PIN2) || \
  600. ((PIN) == PWR_WAKEUP_PIN3) || \
  601. ((PIN) == PWR_WAKEUP_PIN4) || \
  602. ((PIN) == PWR_WAKEUP_PIN5) || \
  603. ((PIN) == PWR_WAKEUP_PIN1_HIGH) || \
  604. ((PIN) == PWR_WAKEUP_PIN2_HIGH) || \
  605. ((PIN) == PWR_WAKEUP_PIN3_HIGH) || \
  606. ((PIN) == PWR_WAKEUP_PIN4_HIGH) || \
  607. ((PIN) == PWR_WAKEUP_PIN5_HIGH) || \
  608. ((PIN) == PWR_WAKEUP_PIN1_LOW) || \
  609. ((PIN) == PWR_WAKEUP_PIN2_LOW) || \
  610. ((PIN) == PWR_WAKEUP_PIN3_LOW) || \
  611. ((PIN) == PWR_WAKEUP_PIN4_LOW) || \
  612. ((PIN) == PWR_WAKEUP_PIN5_LOW))
  613. #if defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) || \
  614. defined (STM32L496xx) || defined (STM32L4A6xx)
  615. #define IS_PWR_PVM_TYPE(TYPE) (((TYPE) == PWR_PVM_1) ||\
  616. ((TYPE) == PWR_PVM_2) ||\
  617. ((TYPE) == PWR_PVM_3) ||\
  618. ((TYPE) == PWR_PVM_4))
  619. #elif defined (STM32L471xx)
  620. #define IS_PWR_PVM_TYPE(TYPE) (((TYPE) == PWR_PVM_2) ||\
  621. ((TYPE) == PWR_PVM_3) ||\
  622. ((TYPE) == PWR_PVM_4))
  623. #endif
  624. #if defined (STM32L433xx) || defined (STM32L443xx) || defined (STM32L452xx) || defined (STM32L462xx)
  625. #define IS_PWR_PVM_TYPE(TYPE) (((TYPE) == PWR_PVM_1) ||\
  626. ((TYPE) == PWR_PVM_3) ||\
  627. ((TYPE) == PWR_PVM_4))
  628. #elif defined (STM32L431xx) || defined (STM32L432xx) || defined (STM32L442xx) || defined (STM32L451xx)
  629. #define IS_PWR_PVM_TYPE(TYPE) (((TYPE) == PWR_PVM_3) ||\
  630. ((TYPE) == PWR_PVM_4))
  631. #endif
  632. #define IS_PWR_PVM_MODE(MODE) (((MODE) == PWR_PVM_MODE_NORMAL) ||\
  633. ((MODE) == PWR_PVM_MODE_IT_RISING) ||\
  634. ((MODE) == PWR_PVM_MODE_IT_FALLING) ||\
  635. ((MODE) == PWR_PVM_MODE_IT_RISING_FALLING) ||\
  636. ((MODE) == PWR_PVM_MODE_EVENT_RISING) ||\
  637. ((MODE) == PWR_PVM_MODE_EVENT_FALLING) ||\
  638. ((MODE) == PWR_PVM_MODE_EVENT_RISING_FALLING))
  639. #define IS_PWR_VOLTAGE_SCALING_RANGE(RANGE) (((RANGE) == PWR_REGULATOR_VOLTAGE_SCALE1) || \
  640. ((RANGE) == PWR_REGULATOR_VOLTAGE_SCALE2))
  641. #define IS_PWR_BATTERY_RESISTOR_SELECT(RESISTOR) (((RESISTOR) == PWR_BATTERY_CHARGING_RESISTOR_5) ||\
  642. ((RESISTOR) == PWR_BATTERY_CHARGING_RESISTOR_1_5))
  643. #define IS_PWR_BATTERY_CHARGING(CHARGING) (((CHARGING) == PWR_BATTERY_CHARGING_DISABLE) ||\
  644. ((CHARGING) == PWR_BATTERY_CHARGING_ENABLE))
  645. #define IS_PWR_GPIO_BIT_NUMBER(BIT_NUMBER) (((BIT_NUMBER) & GPIO_PIN_MASK) != (uint32_t)0x00)
  646. #if defined (STM32L431xx) || defined (STM32L433xx) || defined (STM32L443xx) || \
  647. defined (STM32L451xx) || defined (STM32L452xx) || defined (STM32L462xx)
  648. #define IS_PWR_GPIO(GPIO) (((GPIO) == PWR_GPIO_A) ||\
  649. ((GPIO) == PWR_GPIO_B) ||\
  650. ((GPIO) == PWR_GPIO_C) ||\
  651. ((GPIO) == PWR_GPIO_D) ||\
  652. ((GPIO) == PWR_GPIO_E) ||\
  653. ((GPIO) == PWR_GPIO_H))
  654. #elif defined (STM32L432xx) || defined (STM32L442xx)
  655. #define IS_PWR_GPIO(GPIO) (((GPIO) == PWR_GPIO_A) ||\
  656. ((GPIO) == PWR_GPIO_B) ||\
  657. ((GPIO) == PWR_GPIO_C) ||\
  658. ((GPIO) == PWR_GPIO_H))
  659. #elif defined (STM32L471xx) || defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx)
  660. #define IS_PWR_GPIO(GPIO) (((GPIO) == PWR_GPIO_A) ||\
  661. ((GPIO) == PWR_GPIO_B) ||\
  662. ((GPIO) == PWR_GPIO_C) ||\
  663. ((GPIO) == PWR_GPIO_D) ||\
  664. ((GPIO) == PWR_GPIO_E) ||\
  665. ((GPIO) == PWR_GPIO_F) ||\
  666. ((GPIO) == PWR_GPIO_G) ||\
  667. ((GPIO) == PWR_GPIO_H))
  668. #elif defined (STM32L496xx) || defined (STM32L4A6xx)
  669. #define IS_PWR_GPIO(GPIO) (((GPIO) == PWR_GPIO_A) ||\
  670. ((GPIO) == PWR_GPIO_B) ||\
  671. ((GPIO) == PWR_GPIO_C) ||\
  672. ((GPIO) == PWR_GPIO_D) ||\
  673. ((GPIO) == PWR_GPIO_E) ||\
  674. ((GPIO) == PWR_GPIO_F) ||\
  675. ((GPIO) == PWR_GPIO_G) ||\
  676. ((GPIO) == PWR_GPIO_H) ||\
  677. ((GPIO) == PWR_GPIO_I))
  678. #endif
  679. /**
  680. * @}
  681. */
  682. /** @addtogroup PWREx_Exported_Functions PWR Extended Exported Functions
  683. * @{
  684. */
  685. /** @addtogroup PWREx_Exported_Functions_Group1 Extended Peripheral Control functions
  686. * @{
  687. */
  688. /* Peripheral Control functions **********************************************/
  689. uint32_t HAL_PWREx_GetVoltageRange(void);
  690. HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling);
  691. void HAL_PWREx_EnableBatteryCharging(uint32_t ResistorSelection);
  692. void HAL_PWREx_DisableBatteryCharging(void);
  693. #if defined(PWR_CR2_USV)
  694. void HAL_PWREx_EnableVddUSB(void);
  695. void HAL_PWREx_DisableVddUSB(void);
  696. #endif /* PWR_CR2_USV */
  697. #if defined(PWR_CR2_IOSV)
  698. void HAL_PWREx_EnableVddIO2(void);
  699. void HAL_PWREx_DisableVddIO2(void);
  700. #endif /* PWR_CR2_IOSV */
  701. void HAL_PWREx_EnableInternalWakeUpLine(void);
  702. void HAL_PWREx_DisableInternalWakeUpLine(void);
  703. HAL_StatusTypeDef HAL_PWREx_EnableGPIOPullUp(uint32_t GPIO, uint32_t GPIONumber);
  704. HAL_StatusTypeDef HAL_PWREx_DisableGPIOPullUp(uint32_t GPIO, uint32_t GPIONumber);
  705. HAL_StatusTypeDef HAL_PWREx_EnableGPIOPullDown(uint32_t GPIO, uint32_t GPIONumber);
  706. HAL_StatusTypeDef HAL_PWREx_DisableGPIOPullDown(uint32_t GPIO, uint32_t GPIONumber);
  707. void HAL_PWREx_EnablePullUpPullDownConfig(void);
  708. void HAL_PWREx_DisablePullUpPullDownConfig(void);
  709. void HAL_PWREx_EnableSRAM2ContentRetention(void);
  710. void HAL_PWREx_DisableSRAM2ContentRetention(void);
  711. #if defined(PWR_CR2_PVME1)
  712. void HAL_PWREx_EnablePVM1(void);
  713. void HAL_PWREx_DisablePVM1(void);
  714. #endif /* PWR_CR2_PVME1 */
  715. #if defined(PWR_CR2_PVME2)
  716. void HAL_PWREx_EnablePVM2(void);
  717. void HAL_PWREx_DisablePVM2(void);
  718. #endif /* PWR_CR2_PVME2 */
  719. void HAL_PWREx_EnablePVM3(void);
  720. void HAL_PWREx_DisablePVM3(void);
  721. void HAL_PWREx_EnablePVM4(void);
  722. void HAL_PWREx_DisablePVM4(void);
  723. HAL_StatusTypeDef HAL_PWREx_ConfigPVM(PWR_PVMTypeDef *sConfigPVM);
  724. /* Low Power modes configuration functions ************************************/
  725. void HAL_PWREx_EnableLowPowerRunMode(void);
  726. HAL_StatusTypeDef HAL_PWREx_DisableLowPowerRunMode(void);
  727. void HAL_PWREx_EnterSTOP0Mode(uint8_t STOPEntry);
  728. void HAL_PWREx_EnterSTOP1Mode(uint8_t STOPEntry);
  729. void HAL_PWREx_EnterSTOP2Mode(uint8_t STOPEntry);
  730. void HAL_PWREx_EnterSHUTDOWNMode(void);
  731. void HAL_PWREx_PVD_PVM_IRQHandler(void);
  732. #if defined(PWR_CR2_PVME1)
  733. void HAL_PWREx_PVM1Callback(void);
  734. #endif /* PWR_CR2_PVME1 */
  735. #if defined(PWR_CR2_PVME2)
  736. void HAL_PWREx_PVM2Callback(void);
  737. #endif /* PWR_CR2_PVME2 */
  738. void HAL_PWREx_PVM3Callback(void);
  739. void HAL_PWREx_PVM4Callback(void);
  740. /**
  741. * @}
  742. */
  743. /**
  744. * @}
  745. */
  746. /**
  747. * @}
  748. */
  749. /**
  750. * @}
  751. */
  752. #ifdef __cplusplus
  753. }
  754. #endif
  755. #endif /* __STM32L4xx_HAL_PWR_EX_H */
  756. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/