xref: /btstack/port/stm32-l073rz-nucleo-em9304/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_pwr_ex.h (revision e838079242074edcbcbb400962776e15fe6ca6cb)
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   * <h2><center>&copy; Copyright(c) 2016 STMicroelectronics.
10   * All rights reserved.</center></h2>
11   *
12   * This software component is licensed by ST under BSD 3-Clause license,
13   * the "License"; You may not use this file except in compliance with the
14   * License. You may obtain a copy of the License at:
15   *                        opensource.org/licenses/BSD-3-Clause
16   *
17   ******************************************************************************
18   */
19 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef __STM32L0xx_HAL_PWR_EX_H
22 #define __STM32L0xx_HAL_PWR_EX_H
23 
24 #ifdef __cplusplus
25  extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32l0xx_hal_def.h"
30 
31 /** @addtogroup STM32L0xx_HAL_Driver
32   * @{
33   */
34 
35 /** @defgroup PWREx PWREx
36   * @{
37   */
38 
39 /** @defgroup PWREx_Exported_Macros PWREx Exported Macros
40  * @{
41  */
42 
43 /** @brief  Macros to enable the Deep-sleep mode with Flash memory kept off.
44   * @note   When entering low power mode (stop or standby only), if DS_EE_KOFF and RUN_PD of
45   *         FLASH_ACR register are both set , the Flash memory will not be woken up
46   *         when exiting from deep-sleep mode.
47   */
48 #define __HAL_PWR_FLASHWAKEUP_ENABLE()      CLEAR_BIT(PWR->CR, PWR_CR_DSEEKOFF)
49 
50 /** @brief  Macros to disable the Deep-sleep mode with Flash memory kept off.
51   * @note   When entering low power mode (stop or standby only), if DS_EE_KOFF and RUN_PD of
52   *         FLASH_ACR register are both set , the Flash memory will not be woken up
53   *         when exiting from deep-sleep mode.
54   */
55 #define __HAL_PWR_FLASHWAKEUP_DISABLE()     SET_BIT(PWR->CR, PWR_CR_DSEEKOFF)
56 /**
57   * @}
58   */
59 
60 /** @defgroup PWREx_Exported_Functions PWREx Exported Functions
61  * @{
62  */
63 uint32_t HAL_PWREx_GetVoltageRange(void);
64 void HAL_PWREx_EnableFastWakeUp(void);
65 void HAL_PWREx_DisableFastWakeUp(void);
66 void HAL_PWREx_EnableUltraLowPower(void);
67 void HAL_PWREx_DisableUltraLowPower(void);
68 void HAL_PWREx_EnableLowPowerRunMode(void);
69 HAL_StatusTypeDef HAL_PWREx_DisableLowPowerRunMode(void);
70 /**
71   * @}
72   */
73 
74 /* Define the private group ***********************************/
75 /**************************************************************/
76 /** @defgroup PWREx_Private PWREx Private
77   * @{
78   */
79 /**
80   * @}
81   */
82 /**************************************************************/
83 
84 /**
85   * @}
86   */
87 
88 /**
89   * @}
90   */
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #endif /* __STM32L0xx_HAL_PWR_EX_H */
97 
98 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
99 
100