Subversion Repositories DashDisplay

Rev

Rev 50 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /**
  2.   ******************************************************************************
  3.   * @file    stm32l1xx_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) 2017 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 __STM32L1xx_HAL_PWR_EX_H
  21. #define __STM32L1xx_HAL_PWR_EX_H
  22.  
  23. #ifdef __cplusplus
  24.  extern "C" {
  25. #endif
  26.  
  27. /* Includes ------------------------------------------------------------------*/
  28. #include "stm32l1xx_hal_def.h"
  29.  
  30. /** @addtogroup STM32L1xx_HAL_Driver
  31.   * @{
  32.   */
  33.  
  34. /** @addtogroup PWREx
  35.   * @{
  36.   */
  37.  
  38.  
  39. /* Exported types ------------------------------------------------------------*/
  40. /* Exported constants --------------------------------------------------------*/
  41.  
  42. /** @defgroup PWREx_Exported_Constants PWREx Exported Constants
  43.  *  @{
  44.  */
  45.  
  46.  
  47. /** @defgroup PWREx_WakeUp_Pins PWREx Wakeup Pins
  48.   * @{
  49.   */
  50.  
  51. #if defined (STM32L151xCA) || defined (STM32L151xD) || defined (STM32L152xCA) || defined (STM32L152xD) || defined (STM32L162xCA) || defined (STM32L162xD) || defined (STM32L151xE) || defined (STM32L151xDX) || defined (STM32L152xE) || defined (STM32L152xDX) || defined (STM32L162xE) || defined (STM32L162xDX) || defined (STM32L151xB) || defined (STM32L151xBA) || defined (STM32L151xC) || defined (STM32L152xB) || defined (STM32L152xBA) || defined (STM32L152xC) || defined (STM32L162xC)
  52.  
  53. #define PWR_WAKEUP_PIN1                 PWR_CSR_EWUP1
  54. #define PWR_WAKEUP_PIN2                 PWR_CSR_EWUP2
  55. #define PWR_WAKEUP_PIN3                 PWR_CSR_EWUP3
  56. #define IS_PWR_WAKEUP_PIN(PIN) (((PIN) == PWR_WAKEUP_PIN1) || \
  57.                                 ((PIN) == PWR_WAKEUP_PIN2) || \
  58.                                 ((PIN) == PWR_WAKEUP_PIN3))
  59. #else
  60. #define PWR_WAKEUP_PIN1                 PWR_CSR_EWUP1
  61. #define PWR_WAKEUP_PIN2                 PWR_CSR_EWUP2
  62. #define IS_PWR_WAKEUP_PIN(PIN) (((PIN) == PWR_WAKEUP_PIN1) || \
  63.                                 ((PIN) == PWR_WAKEUP_PIN2))
  64. #endif
  65.  
  66. /**
  67.   * @}
  68.   */
  69.  
  70. /**
  71.   * @}
  72.   */
  73.  
  74. /* Exported macro ------------------------------------------------------------*/
  75. /* Exported functions --------------------------------------------------------*/
  76.  
  77. /** @defgroup PWREx_Exported_Functions PWREx Exported Functions
  78.  *  @{
  79.  */
  80.  
  81. /** @addtogroup PWREx_Exported_Functions_Group1
  82.   * @{
  83.   */
  84.  
  85. /* Peripheral Control methods  ************************************************/
  86. uint32_t HAL_PWREx_GetVoltageRange(void);
  87. void HAL_PWREx_EnableFastWakeUp(void);
  88. void HAL_PWREx_DisableFastWakeUp(void);
  89. void HAL_PWREx_EnableUltraLowPower(void);
  90. void HAL_PWREx_DisableUltraLowPower(void);
  91. void HAL_PWREx_EnableLowPowerRunMode(void);
  92. HAL_StatusTypeDef HAL_PWREx_DisableLowPowerRunMode(void);
  93.  
  94. /**
  95.   * @}
  96.   */
  97.  
  98. /**
  99.   * @}
  100.   */
  101.  
  102. /**
  103.   * @}
  104.   */
  105.  
  106. /**
  107.   * @}
  108.   */
  109.  
  110. #ifdef __cplusplus
  111. }
  112. #endif
  113.  
  114.  
  115. #endif /* __STM32L1xx_HAL_PWR_EX_H */
  116.