stm32f3xx_ll_pwr.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  1. /**
  2. ******************************************************************************
  3. * @file stm32f3xx_ll_pwr.h
  4. * @author MCD Application Team
  5. * @brief Header file of PWR LL module.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * Copyright (c) 2016 STMicroelectronics.
  10. * All rights reserved.
  11. *
  12. * This software is licensed under terms that can be found in the LICENSE file
  13. * in the root directory of this software component.
  14. * If no LICENSE file comes with this software, it is provided AS-IS.
  15. *
  16. ******************************************************************************
  17. */
  18. /* Define to prevent recursive inclusion -------------------------------------*/
  19. #ifndef __STM32F3xx_LL_PWR_H
  20. #define __STM32F3xx_LL_PWR_H
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. /* Includes ------------------------------------------------------------------*/
  25. #include "stm32f3xx.h"
  26. /** @addtogroup STM32F3xx_LL_Driver
  27. * @{
  28. */
  29. #if defined(PWR)
  30. /** @defgroup PWR_LL PWR
  31. * @{
  32. */
  33. /* Private types -------------------------------------------------------------*/
  34. /* Private variables ---------------------------------------------------------*/
  35. /* Private constants ---------------------------------------------------------*/
  36. /* Private macros ------------------------------------------------------------*/
  37. /* Exported types ------------------------------------------------------------*/
  38. /* Exported constants --------------------------------------------------------*/
  39. /** @defgroup PWR_LL_Exported_Constants PWR Exported Constants
  40. * @{
  41. */
  42. /** @defgroup PWR_LL_EC_CLEAR_FLAG Clear Flags Defines
  43. * @brief Flags defines which can be used with LL_PWR_WriteReg function
  44. * @{
  45. */
  46. #define LL_PWR_CR_CSBF PWR_CR_CSBF /*!< Clear standby flag */
  47. #define LL_PWR_CR_CWUF PWR_CR_CWUF /*!< Clear wakeup flag */
  48. /**
  49. * @}
  50. */
  51. /** @defgroup PWR_LL_EC_GET_FLAG Get Flags Defines
  52. * @brief Flags defines which can be used with LL_PWR_ReadReg function
  53. * @{
  54. */
  55. #define LL_PWR_CSR_WUF PWR_CSR_WUF /*!< Wakeup flag */
  56. #define LL_PWR_CSR_SBF PWR_CSR_SBF /*!< Standby flag */
  57. #if defined(PWR_PVD_SUPPORT)
  58. #define LL_PWR_CSR_PVDO PWR_CSR_PVDO /*!< Power voltage detector output flag */
  59. #endif /* PWR_PVD_SUPPORT */
  60. #if defined(PWR_CSR_VREFINTRDYF)
  61. #define LL_PWR_CSR_VREFINTRDYF PWR_CSR_VREFINTRDYF /*!< VREFINT ready flag */
  62. #endif /* PWR_CSR_VREFINTRDYF */
  63. #define LL_PWR_CSR_EWUP1 PWR_CSR_EWUP1 /*!< Enable WKUP pin 1 */
  64. #define LL_PWR_CSR_EWUP2 PWR_CSR_EWUP2 /*!< Enable WKUP pin 2 */
  65. #if defined(PWR_CSR_EWUP3)
  66. #define LL_PWR_CSR_EWUP3 PWR_CSR_EWUP3 /*!< Enable WKUP pin 3 */
  67. #endif /* PWR_CSR_EWUP3 */
  68. /**
  69. * @}
  70. */
  71. /** @defgroup PWR_LL_EC_MODE_PWR Mode Power
  72. * @{
  73. */
  74. #define LL_PWR_MODE_STOP_MAINREGU 0x00000000U /*!< Enter Stop mode when the CPU enters deepsleep */
  75. #define LL_PWR_MODE_STOP_LPREGU (PWR_CR_LPDS) /*!< Enter Stop mode (with low power Regulator ON) when the CPU enters deepsleep */
  76. #define LL_PWR_MODE_STANDBY (PWR_CR_PDDS) /*!< Enter Standby mode when the CPU enters deepsleep */
  77. /**
  78. * @}
  79. */
  80. #if defined(PWR_CR_LPDS)
  81. /** @defgroup PWR_LL_EC_REGU_MODE_DS_MODE Regulator Mode In Deep Sleep Mode
  82. * @{
  83. */
  84. #define LL_PWR_REGU_DSMODE_MAIN 0x00000000U /*!< Voltage Regulator in main mode during deepsleep mode */
  85. #define LL_PWR_REGU_DSMODE_LOW_POWER (PWR_CR_LPDS) /*!< Voltage Regulator in low-power mode during deepsleep mode */
  86. /**
  87. * @}
  88. */
  89. #endif /* PWR_CR_LPDS */
  90. #if defined(PWR_PVD_SUPPORT)
  91. /** @defgroup PWR_LL_EC_PVDLEVEL Power Voltage Detector Level
  92. * @{
  93. */
  94. #define LL_PWR_PVDLEVEL_0 (PWR_CR_PLS_LEV0) /*!< Voltage threshold detected by PVD 2.2 V */
  95. #define LL_PWR_PVDLEVEL_1 (PWR_CR_PLS_LEV1) /*!< Voltage threshold detected by PVD 2.3 V */
  96. #define LL_PWR_PVDLEVEL_2 (PWR_CR_PLS_LEV2) /*!< Voltage threshold detected by PVD 2.4 V */
  97. #define LL_PWR_PVDLEVEL_3 (PWR_CR_PLS_LEV3) /*!< Voltage threshold detected by PVD 2.5 V */
  98. #define LL_PWR_PVDLEVEL_4 (PWR_CR_PLS_LEV4) /*!< Voltage threshold detected by PVD 2.6 V */
  99. #define LL_PWR_PVDLEVEL_5 (PWR_CR_PLS_LEV5) /*!< Voltage threshold detected by PVD 2.7 V */
  100. #define LL_PWR_PVDLEVEL_6 (PWR_CR_PLS_LEV6) /*!< Voltage threshold detected by PVD 2.8 V */
  101. #define LL_PWR_PVDLEVEL_7 (PWR_CR_PLS_LEV7) /*!< Voltage threshold detected by PVD 2.9 V */
  102. /**
  103. * @}
  104. */
  105. #endif /* PWR_PVD_SUPPORT */
  106. /** @defgroup PWR_LL_EC_WAKEUP_PIN Wakeup Pins
  107. * @{
  108. */
  109. #define LL_PWR_WAKEUP_PIN1 (PWR_CSR_EWUP1) /*!< WKUP pin 1 : PA0 */
  110. #define LL_PWR_WAKEUP_PIN2 (PWR_CSR_EWUP2) /*!< WKUP pin 2 : PC13 */
  111. #if defined(PWR_CSR_EWUP3)
  112. #define LL_PWR_WAKEUP_PIN3 (PWR_CSR_EWUP3) /*!< WKUP pin 3 : PE6 or PA2 according to device */
  113. #endif /* PWR_CSR_EWUP3 */
  114. /**
  115. * @}
  116. */
  117. /** @defgroup PWR_LL_EC_SDADC_ANALOG_X SDADC Analogx
  118. * @{
  119. */
  120. #if defined(SDADC1)
  121. #define LL_PWR_SDADC_ANALOG1 (PWR_CR_ENSD1) /*!< Enable SDADC1 */
  122. #endif /* SDADC1 */
  123. #if defined(SDADC2)
  124. #define LL_PWR_SDADC_ANALOG2 (PWR_CR_ENSD2) /*!< Enable SDADC2 */
  125. #endif /* SDADC2 */
  126. #if defined(SDADC3)
  127. #define LL_PWR_SDADC_ANALOG3 (PWR_CR_ENSD3) /*!< Enable SDADC3 */
  128. #endif /* SDADC3 */
  129. /**
  130. * @}
  131. */
  132. /**
  133. * @}
  134. */
  135. /* Exported macro ------------------------------------------------------------*/
  136. /** @defgroup PWR_LL_Exported_Macros PWR Exported Macros
  137. * @{
  138. */
  139. /** @defgroup PWR_LL_EM_WRITE_READ Common write and read registers Macros
  140. * @{
  141. */
  142. /**
  143. * @brief Write a value in PWR register
  144. * @param __REG__ Register to be written
  145. * @param __VALUE__ Value to be written in the register
  146. * @retval None
  147. */
  148. #define LL_PWR_WriteReg(__REG__, __VALUE__) WRITE_REG(PWR->__REG__, (__VALUE__))
  149. /**
  150. * @brief Read a value in PWR register
  151. * @param __REG__ Register to be read
  152. * @retval Register value
  153. */
  154. #define LL_PWR_ReadReg(__REG__) READ_REG(PWR->__REG__)
  155. /**
  156. * @}
  157. */
  158. /**
  159. * @}
  160. */
  161. /* Exported functions --------------------------------------------------------*/
  162. /** @defgroup PWR_LL_Exported_Functions PWR Exported Functions
  163. * @{
  164. */
  165. /** @defgroup PWR_LL_EF_Configuration Configuration
  166. * @{
  167. */
  168. /**
  169. * @brief Enables the SDADC peripheral functionality
  170. * @rmtoll CR ENSD1 LL_PWR_EnableSDADC\n
  171. * CR ENSD2 LL_PWR_EnableSDADC\n
  172. * CR ENSD3 LL_PWR_EnableSDADC
  173. * @param Analogx This parameter can be a combination of the following values:
  174. * @arg @ref LL_PWR_SDADC_ANALOG1
  175. * @arg @ref LL_PWR_SDADC_ANALOG2
  176. * @arg @ref LL_PWR_SDADC_ANALOG3
  177. * @retval None
  178. */
  179. __STATIC_INLINE void LL_PWR_EnableSDADC(uint32_t Analogx)
  180. {
  181. SET_BIT(PWR->CR, Analogx);
  182. }
  183. /**
  184. * @brief Disables the SDADC peripheral functionality
  185. * @rmtoll CR ENSD1 LL_PWR_EnableSDADC\n
  186. * CR ENSD2 LL_PWR_EnableSDADC\n
  187. * CR ENSD3 LL_PWR_EnableSDADC
  188. * @param Analogx This parameter can be a combination of the following values:
  189. * @arg @ref LL_PWR_SDADC_ANALOG1
  190. * @arg @ref LL_PWR_SDADC_ANALOG2
  191. * @arg @ref LL_PWR_SDADC_ANALOG3
  192. * @retval None
  193. */
  194. __STATIC_INLINE void LL_PWR_DisableSDADC(uint32_t Analogx)
  195. {
  196. CLEAR_BIT(PWR->CR, Analogx);
  197. }
  198. /**
  199. * @brief Check if SDADCx has been enabled or not
  200. * @rmtoll CR ENSD1 LL_PWR_IsEnabledSDADC\n
  201. * CR ENSD2 LL_PWR_IsEnabledSDADC\n
  202. * CR ENSD3 LL_PWR_IsEnabledSDADC
  203. * @param Analogx This parameter can be a combination of the following values:
  204. * @arg @ref LL_PWR_SDADC_ANALOG1
  205. * @arg @ref LL_PWR_SDADC_ANALOG2
  206. * @arg @ref LL_PWR_SDADC_ANALOG3
  207. * @retval None
  208. */
  209. __STATIC_INLINE uint32_t LL_PWR_IsEnabledSDADC(uint32_t Analogx)
  210. {
  211. return (READ_BIT(PWR->CR, Analogx) == (Analogx));
  212. }
  213. /**
  214. * @brief Enable access to the backup domain
  215. * @rmtoll CR DBP LL_PWR_EnableBkUpAccess
  216. * @retval None
  217. */
  218. __STATIC_INLINE void LL_PWR_EnableBkUpAccess(void)
  219. {
  220. SET_BIT(PWR->CR, PWR_CR_DBP);
  221. }
  222. /**
  223. * @brief Disable access to the backup domain
  224. * @rmtoll CR DBP LL_PWR_DisableBkUpAccess
  225. * @retval None
  226. */
  227. __STATIC_INLINE void LL_PWR_DisableBkUpAccess(void)
  228. {
  229. CLEAR_BIT(PWR->CR, PWR_CR_DBP);
  230. }
  231. /**
  232. * @brief Check if the backup domain is enabled
  233. * @rmtoll CR DBP LL_PWR_IsEnabledBkUpAccess
  234. * @retval State of bit (1 or 0).
  235. */
  236. __STATIC_INLINE uint32_t LL_PWR_IsEnabledBkUpAccess(void)
  237. {
  238. return (READ_BIT(PWR->CR, PWR_CR_DBP) == (PWR_CR_DBP));
  239. }
  240. #if defined(PWR_CR_LPDS)
  241. /**
  242. * @brief Set voltage Regulator mode during deep sleep mode
  243. * @rmtoll CR LPDS LL_PWR_SetRegulModeDS
  244. * @param RegulMode This parameter can be one of the following values:
  245. * @arg @ref LL_PWR_REGU_DSMODE_MAIN
  246. * @arg @ref LL_PWR_REGU_DSMODE_LOW_POWER
  247. * @retval None
  248. */
  249. __STATIC_INLINE void LL_PWR_SetRegulModeDS(uint32_t RegulMode)
  250. {
  251. MODIFY_REG(PWR->CR, PWR_CR_LPDS, RegulMode);
  252. }
  253. /**
  254. * @brief Get voltage Regulator mode during deep sleep mode
  255. * @rmtoll CR LPDS LL_PWR_GetRegulModeDS
  256. * @retval Returned value can be one of the following values:
  257. * @arg @ref LL_PWR_REGU_DSMODE_MAIN
  258. * @arg @ref LL_PWR_REGU_DSMODE_LOW_POWER
  259. */
  260. __STATIC_INLINE uint32_t LL_PWR_GetRegulModeDS(void)
  261. {
  262. return (uint32_t)(READ_BIT(PWR->CR, PWR_CR_LPDS));
  263. }
  264. #endif /* PWR_CR_LPDS */
  265. /**
  266. * @brief Set Power Down mode when CPU enters deepsleep
  267. * @rmtoll CR PDDS LL_PWR_SetPowerMode\n
  268. * @rmtoll CR LPDS LL_PWR_SetPowerMode
  269. * @param PDMode This parameter can be one of the following values:
  270. * @arg @ref LL_PWR_MODE_STOP_MAINREGU
  271. * @arg @ref LL_PWR_MODE_STOP_LPREGU
  272. * @arg @ref LL_PWR_MODE_STANDBY
  273. * @retval None
  274. */
  275. __STATIC_INLINE void LL_PWR_SetPowerMode(uint32_t PDMode)
  276. {
  277. MODIFY_REG(PWR->CR, (PWR_CR_PDDS| PWR_CR_LPDS), PDMode);
  278. }
  279. /**
  280. * @brief Get Power Down mode when CPU enters deepsleep
  281. * @rmtoll CR PDDS LL_PWR_GetPowerMode\n
  282. * @rmtoll CR LPDS LL_PWR_GetPowerMode
  283. * @retval Returned value can be one of the following values:
  284. * @arg @ref LL_PWR_MODE_STOP_MAINREGU
  285. * @arg @ref LL_PWR_MODE_STOP_LPREGU
  286. * @arg @ref LL_PWR_MODE_STANDBY
  287. */
  288. __STATIC_INLINE uint32_t LL_PWR_GetPowerMode(void)
  289. {
  290. return (uint32_t)(READ_BIT(PWR->CR, (PWR_CR_PDDS| PWR_CR_LPDS)));
  291. }
  292. #if defined(PWR_PVD_SUPPORT)
  293. /**
  294. * @brief Configure the voltage threshold detected by the Power Voltage Detector
  295. * @rmtoll CR PLS LL_PWR_SetPVDLevel
  296. * @param PVDLevel This parameter can be one of the following values:
  297. * @arg @ref LL_PWR_PVDLEVEL_0
  298. * @arg @ref LL_PWR_PVDLEVEL_1
  299. * @arg @ref LL_PWR_PVDLEVEL_2
  300. * @arg @ref LL_PWR_PVDLEVEL_3
  301. * @arg @ref LL_PWR_PVDLEVEL_4
  302. * @arg @ref LL_PWR_PVDLEVEL_5
  303. * @arg @ref LL_PWR_PVDLEVEL_6
  304. * @arg @ref LL_PWR_PVDLEVEL_7
  305. * @retval None
  306. */
  307. __STATIC_INLINE void LL_PWR_SetPVDLevel(uint32_t PVDLevel)
  308. {
  309. MODIFY_REG(PWR->CR, PWR_CR_PLS, PVDLevel);
  310. }
  311. /**
  312. * @brief Get the voltage threshold detection
  313. * @rmtoll CR PLS LL_PWR_GetPVDLevel
  314. * @retval Returned value can be one of the following values:
  315. * @arg @ref LL_PWR_PVDLEVEL_0
  316. * @arg @ref LL_PWR_PVDLEVEL_1
  317. * @arg @ref LL_PWR_PVDLEVEL_2
  318. * @arg @ref LL_PWR_PVDLEVEL_3
  319. * @arg @ref LL_PWR_PVDLEVEL_4
  320. * @arg @ref LL_PWR_PVDLEVEL_5
  321. * @arg @ref LL_PWR_PVDLEVEL_6
  322. * @arg @ref LL_PWR_PVDLEVEL_7
  323. */
  324. __STATIC_INLINE uint32_t LL_PWR_GetPVDLevel(void)
  325. {
  326. return (uint32_t)(READ_BIT(PWR->CR, PWR_CR_PLS));
  327. }
  328. /**
  329. * @brief Enable Power Voltage Detector
  330. * @rmtoll CR PVDE LL_PWR_EnablePVD
  331. * @retval None
  332. */
  333. __STATIC_INLINE void LL_PWR_EnablePVD(void)
  334. {
  335. SET_BIT(PWR->CR, PWR_CR_PVDE);
  336. }
  337. /**
  338. * @brief Disable Power Voltage Detector
  339. * @rmtoll CR PVDE LL_PWR_DisablePVD
  340. * @retval None
  341. */
  342. __STATIC_INLINE void LL_PWR_DisablePVD(void)
  343. {
  344. CLEAR_BIT(PWR->CR, PWR_CR_PVDE);
  345. }
  346. /**
  347. * @brief Check if Power Voltage Detector is enabled
  348. * @rmtoll CR PVDE LL_PWR_IsEnabledPVD
  349. * @retval State of bit (1 or 0).
  350. */
  351. __STATIC_INLINE uint32_t LL_PWR_IsEnabledPVD(void)
  352. {
  353. return (READ_BIT(PWR->CR, PWR_CR_PVDE) == (PWR_CR_PVDE));
  354. }
  355. #endif /* PWR_PVD_SUPPORT */
  356. /**
  357. * @brief Enable the WakeUp PINx functionality
  358. * @rmtoll CSR EWUP1 LL_PWR_EnableWakeUpPin\n
  359. * @rmtoll CSR EWUP2 LL_PWR_EnableWakeUpPin\n
  360. * @rmtoll CSR EWUP3 LL_PWR_EnableWakeUpPin
  361. * @param WakeUpPin This parameter can be one of the following values:
  362. * @arg @ref LL_PWR_WAKEUP_PIN1
  363. * @arg @ref LL_PWR_WAKEUP_PIN2
  364. * @arg @ref LL_PWR_WAKEUP_PIN3 (*)
  365. *
  366. * (*) not available on all devices
  367. * @retval None
  368. */
  369. __STATIC_INLINE void LL_PWR_EnableWakeUpPin(uint32_t WakeUpPin)
  370. {
  371. SET_BIT(PWR->CSR, WakeUpPin);
  372. }
  373. /**
  374. * @brief Disable the WakeUp PINx functionality
  375. * @rmtoll CSR EWUP1 LL_PWR_DisableWakeUpPin\n
  376. * @rmtoll CSR EWUP2 LL_PWR_DisableWakeUpPin\n
  377. * @rmtoll CSR EWUP3 LL_PWR_DisableWakeUpPin
  378. * @param WakeUpPin This parameter can be one of the following values:
  379. * @arg @ref LL_PWR_WAKEUP_PIN1
  380. * @arg @ref LL_PWR_WAKEUP_PIN2
  381. * @arg @ref LL_PWR_WAKEUP_PIN3 (*)
  382. *
  383. * (*) not available on all devices
  384. * @retval None
  385. */
  386. __STATIC_INLINE void LL_PWR_DisableWakeUpPin(uint32_t WakeUpPin)
  387. {
  388. CLEAR_BIT(PWR->CSR, WakeUpPin);
  389. }
  390. /**
  391. * @brief Check if the WakeUp PINx functionality is enabled
  392. * @rmtoll CSR EWUP1 LL_PWR_IsEnabledWakeUpPin\n
  393. * @rmtoll CSR EWUP2 LL_PWR_IsEnabledWakeUpPin\n
  394. * @rmtoll CSR EWUP3 LL_PWR_IsEnabledWakeUpPin
  395. * @param WakeUpPin This parameter can be one of the following values:
  396. * @arg @ref LL_PWR_WAKEUP_PIN1
  397. * @arg @ref LL_PWR_WAKEUP_PIN2
  398. * @arg @ref LL_PWR_WAKEUP_PIN3 (*)
  399. *
  400. * (*) not available on all devices
  401. * @retval State of bit (1 or 0).
  402. */
  403. __STATIC_INLINE uint32_t LL_PWR_IsEnabledWakeUpPin(uint32_t WakeUpPin)
  404. {
  405. return (READ_BIT(PWR->CSR, WakeUpPin) == (WakeUpPin));
  406. }
  407. /**
  408. * @}
  409. */
  410. /** @defgroup PWR_LL_EF_FLAG_Management FLAG_Management
  411. * @{
  412. */
  413. /**
  414. * @brief Get Wake-up Flag
  415. * @rmtoll CSR WUF LL_PWR_IsActiveFlag_WU
  416. * @retval State of bit (1 or 0).
  417. */
  418. __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU(void)
  419. {
  420. return (READ_BIT(PWR->CSR, PWR_CSR_WUF) == (PWR_CSR_WUF));
  421. }
  422. /**
  423. * @brief Get Standby Flag
  424. * @rmtoll CSR SBF LL_PWR_IsActiveFlag_SB
  425. * @retval State of bit (1 or 0).
  426. */
  427. __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_SB(void)
  428. {
  429. return (READ_BIT(PWR->CSR, PWR_CSR_SBF) == (PWR_CSR_SBF));
  430. }
  431. #if defined(PWR_PVD_SUPPORT)
  432. /**
  433. * @brief Indicate whether VDD voltage is below the selected PVD threshold
  434. * @rmtoll CSR PVDO LL_PWR_IsActiveFlag_PVDO
  435. * @retval State of bit (1 or 0).
  436. */
  437. __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_PVDO(void)
  438. {
  439. return (READ_BIT(PWR->CSR, PWR_CSR_PVDO) == (PWR_CSR_PVDO));
  440. }
  441. #endif /* PWR_PVD_SUPPORT */
  442. #if defined(PWR_CSR_VREFINTRDYF)
  443. /**
  444. * @brief Get Internal Reference VrefInt Flag
  445. * @rmtoll CSR VREFINTRDYF LL_PWR_IsActiveFlag_VREFINTRDY
  446. * @retval State of bit (1 or 0).
  447. */
  448. __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_VREFINTRDY(void)
  449. {
  450. return (READ_BIT(PWR->CSR, PWR_CSR_VREFINTRDYF) == (PWR_CSR_VREFINTRDYF));
  451. }
  452. #endif /* PWR_CSR_VREFINTRDYF */
  453. /**
  454. * @brief Clear Standby Flag
  455. * @rmtoll CR CSBF LL_PWR_ClearFlag_SB
  456. * @retval None
  457. */
  458. __STATIC_INLINE void LL_PWR_ClearFlag_SB(void)
  459. {
  460. SET_BIT(PWR->CR, PWR_CR_CSBF);
  461. }
  462. /**
  463. * @brief Clear Wake-up Flags
  464. * @rmtoll CR CWUF LL_PWR_ClearFlag_WU
  465. * @retval None
  466. */
  467. __STATIC_INLINE void LL_PWR_ClearFlag_WU(void)
  468. {
  469. SET_BIT(PWR->CR, PWR_CR_CWUF);
  470. }
  471. /**
  472. * @}
  473. */
  474. #if defined(USE_FULL_LL_DRIVER)
  475. /** @defgroup PWR_LL_EF_Init De-initialization function
  476. * @{
  477. */
  478. ErrorStatus LL_PWR_DeInit(void);
  479. /**
  480. * @}
  481. */
  482. #endif /* USE_FULL_LL_DRIVER */
  483. /**
  484. * @}
  485. */
  486. /**
  487. * @}
  488. */
  489. #endif /* defined(PWR) */
  490. /**
  491. * @}
  492. */
  493. #ifdef __cplusplus
  494. }
  495. #endif
  496. #endif /* __STM32F3xx_LL_PWR_H */