STM32F10x Standard Peripherals Library  3.5.0
/opt/STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/inc/stm32f10x_pwr.h
Go to the documentation of this file.
00001 
00023 /* Define to prevent recursive inclusion -------------------------------------*/
00024 #ifndef __STM32F10x_PWR_H
00025 #define __STM32F10x_PWR_H
00026 
00027 #ifdef __cplusplus
00028  extern "C" {
00029 #endif
00030 
00031 /* Includes ------------------------------------------------------------------*/
00032 #include "stm32f10x.h"
00033 
00058 #define PWR_PVDLevel_2V2          ((uint32_t)0x00000000)
00059 #define PWR_PVDLevel_2V3          ((uint32_t)0x00000020)
00060 #define PWR_PVDLevel_2V4          ((uint32_t)0x00000040)
00061 #define PWR_PVDLevel_2V5          ((uint32_t)0x00000060)
00062 #define PWR_PVDLevel_2V6          ((uint32_t)0x00000080)
00063 #define PWR_PVDLevel_2V7          ((uint32_t)0x000000A0)
00064 #define PWR_PVDLevel_2V8          ((uint32_t)0x000000C0)
00065 #define PWR_PVDLevel_2V9          ((uint32_t)0x000000E0)
00066 #define IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLevel_2V2) || ((LEVEL) == PWR_PVDLevel_2V3)|| \
00067                                  ((LEVEL) == PWR_PVDLevel_2V4) || ((LEVEL) == PWR_PVDLevel_2V5)|| \
00068                                  ((LEVEL) == PWR_PVDLevel_2V6) || ((LEVEL) == PWR_PVDLevel_2V7)|| \
00069                                  ((LEVEL) == PWR_PVDLevel_2V8) || ((LEVEL) == PWR_PVDLevel_2V9))
00070 
00078 #define PWR_Regulator_ON          ((uint32_t)0x00000000)
00079 #define PWR_Regulator_LowPower    ((uint32_t)0x00000001)
00080 #define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_Regulator_ON) || \
00081                                      ((REGULATOR) == PWR_Regulator_LowPower))
00082 
00090 #define PWR_STOPEntry_WFI         ((uint8_t)0x01)
00091 #define PWR_STOPEntry_WFE         ((uint8_t)0x02)
00092 #define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPEntry_WFI) || ((ENTRY) == PWR_STOPEntry_WFE))
00093  
00102 #define PWR_FLAG_WU               ((uint32_t)0x00000001)
00103 #define PWR_FLAG_SB               ((uint32_t)0x00000002)
00104 #define PWR_FLAG_PVDO             ((uint32_t)0x00000004)
00105 #define IS_PWR_GET_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB) || \
00106                                ((FLAG) == PWR_FLAG_PVDO))
00107 
00108 #define IS_PWR_CLEAR_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB))
00109 
00129 void PWR_DeInit(void);
00130 void PWR_BackupAccessCmd(FunctionalState NewState);
00131 void PWR_PVDCmd(FunctionalState NewState);
00132 void PWR_PVDLevelConfig(uint32_t PWR_PVDLevel);
00133 void PWR_WakeUpPinCmd(FunctionalState NewState);
00134 void PWR_EnterSTOPMode(uint32_t PWR_Regulator, uint8_t PWR_STOPEntry);
00135 void PWR_EnterSTANDBYMode(void);
00136 FlagStatus PWR_GetFlagStatus(uint32_t PWR_FLAG);
00137 void PWR_ClearFlag(uint32_t PWR_FLAG);
00138 
00139 #ifdef __cplusplus
00140 }
00141 #endif
00142 
00143 #endif /* __STM32F10x_PWR_H */
00144 
00156 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/