Rev 50 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 50 | Rev 77 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /** |
1 | /** |
2 | ****************************************************************************** |
2 | ****************************************************************************** |
3 | * @file stm32l1xx_hal_pwr_ex.h |
3 | * @file stm32l1xx_hal_pwr_ex.h |
4 | * @author MCD Application Team |
4 | * @author MCD Application Team |
5 | * @brief Header file of PWR HAL Extension module. |
5 | * @brief Header file of PWR HAL Extension module. |
6 | ****************************************************************************** |
6 | ****************************************************************************** |
7 | * @attention |
7 | * @attention |
8 | * |
8 | * |
9 | * <h2><center>© Copyright (c) 2017 STMicroelectronics. |
9 | * Copyright (c) 2017 STMicroelectronics. |
10 | * All rights reserved.</center></h2> |
10 | * All rights reserved. |
11 | * |
11 | * |
12 | * This software component is licensed by ST under BSD 3-Clause license, |
12 | * This software is licensed under terms that can be found in the LICENSE file |
13 | * the "License"; You may not use this file except in compliance with the |
13 | * in the root directory of this software component. |
14 | * License. You may obtain a copy of the License at: |
14 | * If no LICENSE file comes with this software, it is provided AS-IS. |
15 | * opensource.org/licenses/BSD-3-Clause |
15 | * |
16 | * |
16 | ****************************************************************************** |
17 | ****************************************************************************** |
17 | */ |
18 | */ |
18 | |
19 | 19 | /* Define to prevent recursive inclusion -------------------------------------*/ |
|
20 | /* Define to prevent recursive inclusion -------------------------------------*/ |
20 | #ifndef __STM32L1xx_HAL_PWR_EX_H |
21 | #ifndef __STM32L1xx_HAL_PWR_EX_H |
21 | #define __STM32L1xx_HAL_PWR_EX_H |
22 | #define __STM32L1xx_HAL_PWR_EX_H |
22 | |
23 | 23 | #ifdef __cplusplus |
|
24 | #ifdef __cplusplus |
24 | extern "C" { |
25 | extern "C" { |
25 | #endif |
26 | #endif |
26 | |
27 | 27 | /* Includes ------------------------------------------------------------------*/ |
|
28 | /* Includes ------------------------------------------------------------------*/ |
28 | #include "stm32l1xx_hal_def.h" |
29 | #include "stm32l1xx_hal_def.h" |
29 | |
30 | 30 | /** @addtogroup STM32L1xx_HAL_Driver |
|
31 | /** @addtogroup STM32L1xx_HAL_Driver |
31 | * @{ |
32 | * @{ |
32 | */ |
33 | */ |
33 | |
34 | 34 | /** @addtogroup PWREx |
|
35 | /** @addtogroup PWREx |
35 | * @{ |
36 | * @{ |
36 | */ |
37 | */ |
37 | |
38 | 38 | ||
39 | 39 | /* Exported types ------------------------------------------------------------*/ |
|
40 | /* Exported types ------------------------------------------------------------*/ |
40 | /* Exported constants --------------------------------------------------------*/ |
41 | /* Exported constants --------------------------------------------------------*/ |
41 | |
42 | 42 | /** @defgroup PWREx_Exported_Constants PWREx Exported Constants |
|
43 | /** @defgroup PWREx_Exported_Constants PWREx Exported Constants |
43 | * @{ |
44 | * @{ |
44 | */ |
45 | */ |
45 | |
46 | 46 | ||
47 | 47 | /** @defgroup PWREx_WakeUp_Pins PWREx Wakeup Pins |
|
48 | /** @defgroup PWREx_WakeUp_Pins PWREx Wakeup Pins |
48 | * @{ |
49 | * @{ |
49 | */ |
50 | */ |
50 | |
51 | 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 | #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 | 53 | #define PWR_WAKEUP_PIN1 PWR_CSR_EWUP1 |
|
54 | #define PWR_WAKEUP_PIN1 PWR_CSR_EWUP1 |
54 | #define PWR_WAKEUP_PIN2 PWR_CSR_EWUP2 |
55 | #define PWR_WAKEUP_PIN2 PWR_CSR_EWUP2 |
55 | #define PWR_WAKEUP_PIN3 PWR_CSR_EWUP3 |
56 | #define PWR_WAKEUP_PIN3 PWR_CSR_EWUP3 |
56 | #define IS_PWR_WAKEUP_PIN(PIN) (((PIN) == PWR_WAKEUP_PIN1) || \ |
57 | #define IS_PWR_WAKEUP_PIN(PIN) (((PIN) == PWR_WAKEUP_PIN1) || \ |
57 | ((PIN) == PWR_WAKEUP_PIN2) || \ |
58 | ((PIN) == PWR_WAKEUP_PIN2) || \ |
58 | ((PIN) == PWR_WAKEUP_PIN3)) |
59 | ((PIN) == PWR_WAKEUP_PIN3)) |
59 | #else |
60 | #else |
60 | #define PWR_WAKEUP_PIN1 PWR_CSR_EWUP1 |
61 | #define PWR_WAKEUP_PIN1 PWR_CSR_EWUP1 |
61 | #define PWR_WAKEUP_PIN2 PWR_CSR_EWUP2 |
62 | #define PWR_WAKEUP_PIN2 PWR_CSR_EWUP2 |
62 | #define IS_PWR_WAKEUP_PIN(PIN) (((PIN) == PWR_WAKEUP_PIN1) || \ |
63 | #define IS_PWR_WAKEUP_PIN(PIN) (((PIN) == PWR_WAKEUP_PIN1) || \ |
63 | ((PIN) == PWR_WAKEUP_PIN2)) |
64 | ((PIN) == PWR_WAKEUP_PIN2)) |
64 | #endif |
65 | #endif |
65 | |
66 | 66 | /** |
|
67 | /** |
67 | * @} |
68 | * @} |
68 | */ |
69 | */ |
69 | |
70 | 70 | /** |
|
71 | /** |
71 | * @} |
72 | * @} |
72 | */ |
73 | */ |
73 | |
74 | 74 | /* Exported macro ------------------------------------------------------------*/ |
|
75 | /* Exported macro ------------------------------------------------------------*/ |
75 | /* Exported functions --------------------------------------------------------*/ |
76 | /* Exported functions --------------------------------------------------------*/ |
76 | |
77 | 77 | /** @defgroup PWREx_Exported_Functions PWREx Exported Functions |
|
78 | /** @defgroup PWREx_Exported_Functions PWREx Exported Functions |
78 | * @{ |
79 | * @{ |
79 | */ |
80 | */ |
80 | |
81 | 81 | /** @addtogroup PWREx_Exported_Functions_Group1 |
|
82 | /** @addtogroup PWREx_Exported_Functions_Group1 |
82 | * @{ |
83 | * @{ |
83 | */ |
84 | */ |
84 | |
85 | 85 | /* Peripheral Control methods ************************************************/ |
|
86 | /* Peripheral Control methods ************************************************/ |
86 | uint32_t HAL_PWREx_GetVoltageRange(void); |
87 | uint32_t HAL_PWREx_GetVoltageRange(void); |
87 | void HAL_PWREx_EnableFastWakeUp(void); |
88 | void HAL_PWREx_EnableFastWakeUp(void); |
88 | void HAL_PWREx_DisableFastWakeUp(void); |
89 | void HAL_PWREx_DisableFastWakeUp(void); |
89 | void HAL_PWREx_EnableUltraLowPower(void); |
90 | void HAL_PWREx_EnableUltraLowPower(void); |
90 | void HAL_PWREx_DisableUltraLowPower(void); |
91 | void HAL_PWREx_DisableUltraLowPower(void); |
91 | void HAL_PWREx_EnableLowPowerRunMode(void); |
92 | void HAL_PWREx_EnableLowPowerRunMode(void); |
92 | HAL_StatusTypeDef HAL_PWREx_DisableLowPowerRunMode(void); |
93 | HAL_StatusTypeDef HAL_PWREx_DisableLowPowerRunMode(void); |
93 | |
94 | 94 | /** |
|
95 | /** |
95 | * @} |
96 | * @} |
96 | */ |
97 | */ |
97 | |
98 | 98 | /** |
|
99 | /** |
99 | * @} |
100 | * @} |
100 | */ |
101 | */ |
101 | |
102 | 102 | /** |
|
103 | /** |
103 | * @} |
104 | * @} |
104 | */ |
105 | */ |
105 | |
106 | 106 | /** |
|
107 | /** |
107 | * @} |
108 | * @} |
108 | */ |
109 | */ |
109 | |
110 | 110 | #ifdef __cplusplus |
|
111 | #ifdef __cplusplus |
111 | } |
112 | } |
112 | #endif |
113 | #endif |
113 | |
114 | 114 | ||
115 | 115 | #endif /* __STM32L1xx_HAL_PWR_EX_H */ |
|
116 | #endif /* __STM32L1xx_HAL_PWR_EX_H */ |
- | |
117 | - | ||
118 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
- |