1 /** 2 ****************************************************************************** 3 * @file stm32l0xx_hal_pwr_ex.h 4 * @author MCD Application Team 5 * @brief Header file of PWR HAL Extension 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 19 /* Define to prevent recursive inclusion -------------------------------------*/ 20 #ifndef __STM32L0xx_HAL_PWR_EX_H 21 #define __STM32L0xx_HAL_PWR_EX_H 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 /* Includes ------------------------------------------------------------------*/ 28 #include "stm32l0xx_hal_def.h" 29 30 /** @addtogroup STM32L0xx_HAL_Driver 31 * @{ 32 */ 33 34 /** @defgroup PWREx PWREx 35 * @{ 36 */ 37 38 /** @defgroup PWREx_Exported_Macros PWREx Exported Macros 39 * @{ 40 */ 41 42 /** @brief Macros to enable the Deep-sleep mode with Flash memory kept off. 43 * @note When entering low power mode (stop or standby only), if DS_EE_KOFF and RUN_PD of 44 * FLASH_ACR register are both set , the Flash memory will not be woken up 45 * when exiting from deep-sleep mode. 46 */ 47 #define __HAL_PWR_FLASHWAKEUP_ENABLE() CLEAR_BIT(PWR->CR, PWR_CR_DSEEKOFF) 48 49 /** @brief Macros to disable the Deep-sleep mode with Flash memory kept off. 50 * @note When entering low power mode (stop or standby only), if DS_EE_KOFF and RUN_PD of 51 * FLASH_ACR register are both set , the Flash memory will not be woken up 52 * when exiting from deep-sleep mode. 53 */ 54 #define __HAL_PWR_FLASHWAKEUP_DISABLE() SET_BIT(PWR->CR, PWR_CR_DSEEKOFF) 55 /** 56 * @} 57 */ 58 59 /** @defgroup PWREx_Exported_Functions PWREx Exported Functions 60 * @{ 61 */ 62 uint32_t HAL_PWREx_GetVoltageRange(void); 63 void HAL_PWREx_EnableFastWakeUp(void); 64 void HAL_PWREx_DisableFastWakeUp(void); 65 void HAL_PWREx_EnableUltraLowPower(void); 66 void HAL_PWREx_DisableUltraLowPower(void); 67 void HAL_PWREx_EnableLowPowerRunMode(void); 68 HAL_StatusTypeDef HAL_PWREx_DisableLowPowerRunMode(void); 69 /** 70 * @} 71 */ 72 73 /* Define the private group ***********************************/ 74 /**************************************************************/ 75 /** @defgroup PWREx_Private PWREx Private 76 * @{ 77 */ 78 /** 79 * @} 80 */ 81 /**************************************************************/ 82 83 /** 84 * @} 85 */ 86 87 /** 88 * @} 89 */ 90 91 #ifdef __cplusplus 92 } 93 #endif 94 95 #endif /* __STM32L0xx_HAL_PWR_EX_H */ 96