stm32l0xx_hal_pwr_ex.h 2.7 KB

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