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_bkp.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_bkp.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
*                      BKP 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_BKP_H
19
#define __STM32F10x_BKP_H
20
 
21
/* Includes ------------------------------------------------------------------*/
22
#include "stm32f10x_map.h"
23
 
24
/* Exported types ------------------------------------------------------------*/
25
/* Exported constants --------------------------------------------------------*/
26
/* Tamper Pin active level */
27
#define BKP_TamperPinLevel_High           ((u16)0x0000)
28
#define BKP_TamperPinLevel_Low            ((u16)0x0001)
29
 
30
#define IS_BKP_TAMPER_PIN_LEVEL(LEVEL) (((LEVEL) == BKP_TamperPinLevel_High) || \
31
                                        ((LEVEL) == BKP_TamperPinLevel_Low))
32
 
33
/* RTC output source to output on the Tamper pin */
34
#define BKP_RTCOutputSource_None          ((u16)0x0000)
35
#define BKP_RTCOutputSource_CalibClock    ((u16)0x0080)
36
#define BKP_RTCOutputSource_Alarm         ((u16)0x0100)
37
#define BKP_RTCOutputSource_Second        ((u16)0x0300)
38
 
39
#define IS_BKP_RTC_OUTPUT_SOURCE(SOURCE) (((SOURCE) == BKP_RTCOutputSource_None) || \
40
                                          ((SOURCE) == BKP_RTCOutputSource_CalibClock) || \
41
                                          ((SOURCE) == BKP_RTCOutputSource_Alarm) || \
42
                                          ((SOURCE) == BKP_RTCOutputSource_Second))
43
 
44
/* Data Backup Register */
45
#define BKP_DR1                           ((u16)0x0004)
46
#define BKP_DR2                           ((u16)0x0008)
47
#define BKP_DR3                           ((u16)0x000C)
48
#define BKP_DR4                           ((u16)0x0010)
49
#define BKP_DR5                           ((u16)0x0014)
50
#define BKP_DR6                           ((u16)0x0018)
51
#define BKP_DR7                           ((u16)0x001C)
52
#define BKP_DR8                           ((u16)0x0020)
53
#define BKP_DR9                           ((u16)0x0024)
54
#define BKP_DR10                          ((u16)0x0028)
55
#define BKP_DR11                          ((u16)0x0040)
56
#define BKP_DR12                          ((u16)0x0044)
57
#define BKP_DR13                          ((u16)0x0048)
58
#define BKP_DR14                          ((u16)0x004C)
59
#define BKP_DR15                          ((u16)0x0050)
60
#define BKP_DR16                          ((u16)0x0054)
61
#define BKP_DR17                          ((u16)0x0058)
62
#define BKP_DR18                          ((u16)0x005C)
63
#define BKP_DR19                          ((u16)0x0060)
64
#define BKP_DR20                          ((u16)0x0064)
65
#define BKP_DR21                          ((u16)0x0068)
66
#define BKP_DR22                          ((u16)0x006C)
67
#define BKP_DR23                          ((u16)0x0070)
68
#define BKP_DR24                          ((u16)0x0074)
69
#define BKP_DR25                          ((u16)0x0078)
70
#define BKP_DR26                          ((u16)0x007C)
71
#define BKP_DR27                          ((u16)0x0080)
72
#define BKP_DR28                          ((u16)0x0084)
73
#define BKP_DR29                          ((u16)0x0088)
74
#define BKP_DR30                          ((u16)0x008C)
75
#define BKP_DR31                          ((u16)0x0090)
76
#define BKP_DR32                          ((u16)0x0094)
77
#define BKP_DR33                          ((u16)0x0098)
78
#define BKP_DR34                          ((u16)0x009C)
79
#define BKP_DR35                          ((u16)0x00A0)
80
#define BKP_DR36                          ((u16)0x00A4)
81
#define BKP_DR37                          ((u16)0x00A8)
82
#define BKP_DR38                          ((u16)0x00AC)
83
#define BKP_DR39                          ((u16)0x00B0)
84
#define BKP_DR40                          ((u16)0x00B4)
85
#define BKP_DR41                          ((u16)0x00B8)
86
#define BKP_DR42                          ((u16)0x00BC)
87
 
88
#define IS_BKP_DR(DR) (((DR) == BKP_DR1)  || ((DR) == BKP_DR2)  || ((DR) == BKP_DR3)  || \
89
                       ((DR) == BKP_DR4)  || ((DR) == BKP_DR5)  || ((DR) == BKP_DR6)  || \
90
                       ((DR) == BKP_DR7)  || ((DR) == BKP_DR8)  || ((DR) == BKP_DR9)  || \
91
                       ((DR) == BKP_DR10) || ((DR) == BKP_DR11) || ((DR) == BKP_DR12) || \
92
                       ((DR) == BKP_DR13) || ((DR) == BKP_DR14) || ((DR) == BKP_DR15) || \
93
                       ((DR) == BKP_DR16) || ((DR) == BKP_DR17) || ((DR) == BKP_DR18) || \
94
                       ((DR) == BKP_DR19) || ((DR) == BKP_DR20) || ((DR) == BKP_DR21) || \
95
                       ((DR) == BKP_DR22) || ((DR) == BKP_DR23) || ((DR) == BKP_DR24) || \
96
                       ((DR) == BKP_DR25) || ((DR) == BKP_DR26) || ((DR) == BKP_DR27) || \
97
                       ((DR) == BKP_DR28) || ((DR) == BKP_DR29) || ((DR) == BKP_DR30) || \
98
                       ((DR) == BKP_DR31) || ((DR) == BKP_DR32) || ((DR) == BKP_DR33) || \
99
                       ((DR) == BKP_DR34) || ((DR) == BKP_DR35) || ((DR) == BKP_DR36) || \
100
                       ((DR) == BKP_DR37) || ((DR) == BKP_DR38) || ((DR) == BKP_DR39) || \
101
                       ((DR) == BKP_DR40) || ((DR) == BKP_DR41) || ((DR) == BKP_DR42))
102
 
103
#define IS_BKP_CALIBRATION_VALUE(VALUE) ((VALUE) <= 0x7F)
104
 
105
/* Exported macro ------------------------------------------------------------*/
106
/* Exported functions ------------------------------------------------------- */
107
void BKP_DeInit(void);
108
void BKP_TamperPinLevelConfig(u16 BKP_TamperPinLevel);
109
void BKP_TamperPinCmd(FunctionalState NewState);
110
void BKP_ITConfig(FunctionalState NewState);
111
void BKP_RTCOutputConfig(u16 BKP_RTCOutputSource);
112
void BKP_SetRTCCalibrationValue(u8 CalibrationValue);
113
void BKP_WriteBackupRegister(u16 BKP_DR, u16 Data);
114
u16 BKP_ReadBackupRegister(u16 BKP_DR);
115
FlagStatus BKP_GetFlagStatus(void);
116
void BKP_ClearFlag(void);
117
ITStatus BKP_GetITStatus(void);
118
void BKP_ClearITPendingBit(void);
119
 
120
#endif /* __STM32F10x_BKP_H */
121
 
122
/******************* (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.