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