My Project
Loading...
Searching...
No Matches
stm32f3xx_hal_pwr.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef __STM32F3xx_HAL_PWR_H
21#define __STM32F3xx_HAL_PWR_H
22
23#ifdef __cplusplus
24 extern "C" {
25#endif
26
27/* Includes ------------------------------------------------------------------*/
28#include "stm32f3xx_hal_def.h"
29
38/* Exported types ------------------------------------------------------------*/
39/* Exported constants --------------------------------------------------------*/
48#define PWR_WAKEUP_PIN1 ((uint32_t)PWR_CSR_EWUP1)
49#define PWR_WAKEUP_PIN2 ((uint32_t)PWR_CSR_EWUP2)
50#define PWR_WAKEUP_PIN3 ((uint32_t)PWR_CSR_EWUP3)
58#define PWR_MAINREGULATOR_ON (0x00000000U)
59#define PWR_LOWPOWERREGULATOR_ON PWR_CR_LPDS
67#define PWR_SLEEPENTRY_WFI ((uint8_t)0x01U)
68#define PWR_SLEEPENTRY_WFE ((uint8_t)0x02U)
76#define PWR_STOPENTRY_WFI ((uint8_t)0x01U)
77#define PWR_STOPENTRY_WFE ((uint8_t)0x02U)
85#define PWR_FLAG_WU PWR_CSR_WUF
86#define PWR_FLAG_SB PWR_CSR_SBF
87#define PWR_FLAG_PVDO PWR_CSR_PVDO
88#define PWR_FLAG_VREFINTRDY PWR_CSR_VREFINTRDYF
97/* Exported macro ------------------------------------------------------------*/
120#define __HAL_PWR_GET_FLAG(__FLAG__) ((PWR->CSR & (__FLAG__)) == (__FLAG__))
121
128#define __HAL_PWR_CLEAR_FLAG(__FLAG__) (PWR->CR |= (__FLAG__) << 2U)
129
134/* Private macros --------------------------------------------------------*/
139#define IS_PWR_WAKEUP_PIN(PIN) (((PIN) == PWR_WAKEUP_PIN1) || \
140 ((PIN) == PWR_WAKEUP_PIN2) || \
141 ((PIN) == PWR_WAKEUP_PIN3))
142
143#define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_MAINREGULATOR_ON) || \
144 ((REGULATOR) == PWR_LOWPOWERREGULATOR_ON))
145
146#define IS_PWR_SLEEP_ENTRY(ENTRY) (((ENTRY) == PWR_SLEEPENTRY_WFI) || ((ENTRY) == PWR_SLEEPENTRY_WFE))
147
148#define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPENTRY_WFI) || ((ENTRY) == PWR_STOPENTRY_WFE))
149
154/* Include PWR HAL Extended module */
155#include "stm32f3xx_hal_pwr_ex.h"
156
157/* Exported functions --------------------------------------------------------*/
158
167/* Initialization and de-initialization functions *****************************/
168void HAL_PWR_DeInit(void);
169
178/* Peripheral Control functions **********************************************/
181
182/* WakeUp pins configuration functions ****************************************/
183void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPinx);
184void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx);
185
186/* Low Power modes configuration functions ************************************/
187void HAL_PWR_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry);
188void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry);
190
211#ifdef __cplusplus
212}
213#endif
214
215
216#endif /* __STM32F3xx_HAL_PWR_H */
void HAL_PWR_DeInit(void)
void HAL_PWR_DisableBkUpAccess(void)
void HAL_PWR_DisableSleepOnExit(void)
void HAL_PWR_EnableBkUpAccess(void)
void HAL_PWR_EnterSTANDBYMode(void)
void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry)
void HAL_PWR_EnableSEVOnPend(void)
void HAL_PWR_DisableSEVOnPend(void)
void HAL_PWR_EnableSleepOnExit(void)
void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPinx)
void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx)
void HAL_PWR_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry)
This file contains HAL common defines, enumeration, macros and structures definitions.
Header file of PWR HAL Extended module.