OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [CORTEX_STM32L152_IAR/] [system_and_ST_code/] [STM32L1xx_StdPeriph_Driver/] [inc/] [stm32l1xx_pwr.h] - Blame information for rev 582

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 582 jeremybenn
/**
2
  ******************************************************************************
3
  * @file    stm32l1xx_pwr.h
4
  * @author  MCD Application Team
5
  * @version V1.0.0RC1
6
  * @date    07/02/2010
7
  * @brief   This file contains all the functions prototypes for the PWR firmware
8
  *          library.
9
  ******************************************************************************
10
  * @copy
11
  *
12
  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14
  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15
  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16
  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17
  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18
  *
19
  * <h2><center>&copy; COPYRIGHT 2010 STMicroelectronics</center></h2>
20
  */
21
 
22
/* Define to prevent recursive inclusion -------------------------------------*/
23
#ifndef __STM32L1xx_PWR_H
24
#define __STM32L1xx_PWR_H
25
 
26
#ifdef __cplusplus
27
 extern "C" {
28
#endif
29
 
30
/* Includes ------------------------------------------------------------------*/
31
#include "stm32l1xx.h"
32
 
33
/** @addtogroup STM32L1xx_StdPeriph_Driver
34
  * @{
35
  */
36
 
37
/** @addtogroup PWR
38
  * @{
39
  */
40
 
41
/** @defgroup PWR_Exported_Types
42
  * @{
43
  */
44
 
45
/**
46
  * @}
47
  */
48
 
49
/** @defgroup PWR_Exported_Constants
50
  * @{
51
  */
52
 
53
/** @defgroup PVD_detection_level
54
  * @{
55
  */
56
 
57
#define PWR_PVDLevel_0          PWR_CR_PLS_LEV0
58
#define PWR_PVDLevel_1          PWR_CR_PLS_LEV1
59
#define PWR_PVDLevel_2          PWR_CR_PLS_LEV2
60
#define PWR_PVDLevel_3          PWR_CR_PLS_LEV3
61
#define PWR_PVDLevel_4          PWR_CR_PLS_LEV4
62
#define PWR_PVDLevel_5          PWR_CR_PLS_LEV5
63
#define PWR_PVDLevel_6          PWR_CR_PLS_LEV6
64
#define PWR_PVDLevel_7          PWR_CR_PLS_LEV7 /* External input analog voltage 
65
                                               (Compare internally to VREFINT) */
66
#define IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLevel_0) || ((LEVEL) == PWR_PVDLevel_1)|| \
67
                                 ((LEVEL) == PWR_PVDLevel_2) || ((LEVEL) == PWR_PVDLevel_3)|| \
68
                                 ((LEVEL) == PWR_PVDLevel_4) || ((LEVEL) == PWR_PVDLevel_5)|| \
69
                                 ((LEVEL) == PWR_PVDLevel_6) || ((LEVEL) == PWR_PVDLevel_7))
70
/**
71
  * @}
72
  */
73
 
74
/** @defgroup WakeUp_Pins
75
  * @{
76
  */
77
 
78
#define PWR_WakeUpPin_1           ((uint32_t)0x00000000)
79
#define PWR_WakeUpPin_2           ((uint32_t)0x00000004)
80
#define PWR_WakeUpPin_3           ((uint32_t)0x00000008)
81
#define IS_PWR_WAKEUP_PIN(PIN) (((PIN) == PWR_WakeUpPin_1) || \
82
                                ((PIN) == PWR_WakeUpPin_2) || \
83
                                ((PIN) == PWR_WakeUpPin_3))
84
/**
85
  * @}
86
  */
87
 
88
 
89
/** @defgroup Voltage_Scaling_Ranges
90
  * @{
91
  */
92
 
93
#define PWR_VoltageScaling_Range1       PWR_CR_VOS_0
94
#define PWR_VoltageScaling_Range2       PWR_CR_VOS_1
95
#define PWR_VoltageScaling_Range3       PWR_CR_VOS
96
 
97
#define IS_PWR_VOLTAGE_SCALING_RANGE(RANGE) (((RANGE) == PWR_VoltageScaling_Range1) || \
98
                                             ((RANGE) == PWR_VoltageScaling_Range2) || \
99
                                             ((RANGE) == PWR_VoltageScaling_Range3))
100
/**
101
  * @}
102
  */
103
 
104
/** @defgroup Regulator_state_is_Sleep_STOP_mode
105
  * @{
106
  */
107
 
108
#define PWR_Regulator_ON                ((uint32_t)0x00000000)
109
#define PWR_Regulator_LowPower          PWR_CR_LPSDSR
110
#define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_Regulator_ON) || \
111
                                     ((REGULATOR) == PWR_Regulator_LowPower))
112
/**
113
  * @}
114
  */
115
 
116
/** @defgroup SLEEP_mode_entry
117
  * @{
118
  */
119
 
120
#define PWR_SLEEPEntry_WFI         ((uint8_t)0x01)
121
#define PWR_SLEEPEntry_WFE         ((uint8_t)0x02)
122
#define IS_PWR_SLEEP_ENTRY(ENTRY) (((ENTRY) == PWR_SLEEPEntry_WFI) || ((ENTRY) == PWR_SLEEPEntry_WFE))
123
 
124
/**
125
  * @}
126
  */
127
 
128
/** @defgroup STOP_mode_entry
129
  * @{
130
  */
131
 
132
#define PWR_STOPEntry_WFI         ((uint8_t)0x01)
133
#define PWR_STOPEntry_WFE         ((uint8_t)0x02)
134
#define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPEntry_WFI) || ((ENTRY) == PWR_STOPEntry_WFE))
135
 
136
/**
137
  * @}
138
  */
139
 
140
/** @defgroup PWR_Flag
141
  * @{
142
  */
143
 
144
#define PWR_FLAG_WU               PWR_CSR_WUF
145
#define PWR_FLAG_SB               PWR_CSR_SBF
146
#define PWR_FLAG_PVDO             PWR_CSR_PVDO
147
#define PWR_FLAG_VREFINTRDY       PWR_CSR_VREFINTRDYF
148
#define PWR_FLAG_VOS              PWR_CSR_VOSF
149
#define PWR_FLAG_REGLP            PWR_CSR_REGLPF
150
 
151
#define IS_PWR_GET_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB) || \
152
                               ((FLAG) == PWR_FLAG_PVDO) || ((FLAG) == PWR_FLAG_VREFINTRDY) || \
153
                               ((FLAG) == PWR_FLAG_VOS) || ((FLAG) == PWR_FLAG_REGLP))
154
 
155
#define IS_PWR_CLEAR_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB))
156
/**
157
  * @}
158
  */
159
 
160
/**
161
  * @}
162
  */
163
 
164
/** @defgroup PWR_Exported_Macros
165
  * @{
166
  */
167
 
168
/**
169
  * @}
170
  */
171
 
172
/** @defgroup PWR_Exported_Functions
173
  * @{
174
  */
175
 
176
void PWR_DeInit(void);
177
void PWR_RTCAccessCmd(FunctionalState NewState);
178
void PWR_PVDCmd(FunctionalState NewState);
179
void PWR_PVDLevelConfig(uint32_t PWR_PVDLevel);
180
void PWR_WakeUpPinCmd(uint32_t PWR_WakeUpPin, FunctionalState NewState);
181
void PWR_FastWakeUpCmd(FunctionalState NewState);
182
void PWR_UltraLowPowerCmd(FunctionalState NewState);
183
void PWR_VoltageScalingConfig(uint32_t PWR_VoltageScaling);
184
void PWR_EnterLowPowerRunMode(FunctionalState NewState);
185
void PWR_EnterSleepMode(uint32_t PWR_Regulator, uint8_t PWR_SLEEPEntry);
186
void PWR_EnterSTOPMode(uint32_t PWR_Regulator, uint8_t PWR_STOPEntry);
187
void PWR_EnterSTANDBYMode(void);
188
FlagStatus PWR_GetFlagStatus(uint32_t PWR_FLAG);
189
void PWR_ClearFlag(uint32_t PWR_FLAG);
190
 
191
#ifdef __cplusplus
192
}
193
#endif
194
 
195
#endif /* __STM32L1xx_PWR_H */
196
/**
197
  * @}
198
  */
199
 
200
/**
201
  * @}
202
  */
203
 
204
/**
205
  * @}
206
  */
207
 
208
/******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.