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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [CORTEX_STM32F103_GCC_Rowley/] [ST Library/] [inc/] [stm32f10x_pwr.h] - Blame information for rev 582

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 582 jeremybenn
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
2
* File Name          : stm32f10x_pwr.h
3
* Author             : MCD Application Team
4
* Version            : V2.0.1
5
* Date               : 06/13/2008
6
* Description        : This file contains all the functions prototypes for the
7
*                      PWR firmware library.
8
********************************************************************************
9
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
10
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
11
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
12
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
13
* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
14
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
15
*******************************************************************************/
16
 
17
/* Define to prevent recursive inclusion -------------------------------------*/
18
#ifndef __STM32F10x_PWR_H
19
#define __STM32F10x_PWR_H
20
 
21
/* Includes ------------------------------------------------------------------*/
22
#include "stm32f10x_map.h"
23
 
24
/* Exported types ------------------------------------------------------------*/
25
/* Exported constants --------------------------------------------------------*/
26
/* PVD detection level */
27
#define PWR_PVDLevel_2V2          ((u32)0x00000000)
28
#define PWR_PVDLevel_2V3          ((u32)0x00000020)
29
#define PWR_PVDLevel_2V4          ((u32)0x00000040)
30
#define PWR_PVDLevel_2V5          ((u32)0x00000060)
31
#define PWR_PVDLevel_2V6          ((u32)0x00000080)
32
#define PWR_PVDLevel_2V7          ((u32)0x000000A0)
33
#define PWR_PVDLevel_2V8          ((u32)0x000000C0)
34
#define PWR_PVDLevel_2V9          ((u32)0x000000E0)
35
 
36
#define IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLevel_2V2) || ((LEVEL) == PWR_PVDLevel_2V3)|| \
37
                                 ((LEVEL) == PWR_PVDLevel_2V4) || ((LEVEL) == PWR_PVDLevel_2V5)|| \
38
                                 ((LEVEL) == PWR_PVDLevel_2V6) || ((LEVEL) == PWR_PVDLevel_2V7)|| \
39
                                 ((LEVEL) == PWR_PVDLevel_2V8) || ((LEVEL) == PWR_PVDLevel_2V9))
40
 
41
/* Regulator state is STOP mode */
42
#define PWR_Regulator_ON          ((u32)0x00000000)
43
#define PWR_Regulator_LowPower    ((u32)0x00000001)
44
 
45
#define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_Regulator_ON) || \
46
                                     ((REGULATOR) == PWR_Regulator_LowPower))
47
 
48
/* STOP mode entry */
49
#define PWR_STOPEntry_WFI         ((u8)0x01)
50
#define PWR_STOPEntry_WFE         ((u8)0x02)
51
 
52
#define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPEntry_WFI) || ((ENTRY) == PWR_STOPEntry_WFE))
53
 
54
/* PWR Flag */
55
#define PWR_FLAG_WU               ((u32)0x00000001)
56
#define PWR_FLAG_SB               ((u32)0x00000002)
57
#define PWR_FLAG_PVDO             ((u32)0x00000004)
58
 
59
#define IS_PWR_GET_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB) || \
60
                               ((FLAG) == PWR_FLAG_PVDO))
61
#define IS_PWR_CLEAR_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB))
62
 
63
/* Exported macro ------------------------------------------------------------*/
64
/* Exported functions ------------------------------------------------------- */
65
void PWR_DeInit(void);
66
void PWR_BackupAccessCmd(FunctionalState NewState);
67
void PWR_PVDCmd(FunctionalState NewState);
68
void PWR_PVDLevelConfig(u32 PWR_PVDLevel);
69
void PWR_WakeUpPinCmd(FunctionalState NewState);
70
void PWR_EnterSTOPMode(u32 PWR_Regulator, u8 PWR_STOPEntry);
71
void PWR_EnterSTANDBYMode(void);
72
FlagStatus PWR_GetFlagStatus(u32 PWR_FLAG);
73
void PWR_ClearFlag(u32 PWR_FLAG);
74
 
75
#endif /* __STM32F10x_PWR_H */
76
 
77
/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/

powered by: WebSVN 2.1.0

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