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.
 
 
 

100 lines
2.8 KiB

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