24 #ifndef __STM32F10x_BKP_H 25 #define __STM32F10x_BKP_H 58 #define BKP_TamperPinLevel_High ((uint16_t)0x0000) 59 #define BKP_TamperPinLevel_Low ((uint16_t)0x0001) 60 #define IS_BKP_TAMPER_PIN_LEVEL(LEVEL) (((LEVEL) == BKP_TamperPinLevel_High) || \ 61 ((LEVEL) == BKP_TamperPinLevel_Low)) 70 #define BKP_RTCOutputSource_None ((uint16_t)0x0000) 71 #define BKP_RTCOutputSource_CalibClock ((uint16_t)0x0080) 72 #define BKP_RTCOutputSource_Alarm ((uint16_t)0x0100) 73 #define BKP_RTCOutputSource_Second ((uint16_t)0x0300) 74 #define IS_BKP_RTC_OUTPUT_SOURCE(SOURCE) (((SOURCE) == BKP_RTCOutputSource_None) || \ 75 ((SOURCE) == BKP_RTCOutputSource_CalibClock) || \ 76 ((SOURCE) == BKP_RTCOutputSource_Alarm) || \ 77 ((SOURCE) == BKP_RTCOutputSource_Second)) 86 #define BKP_DR1 ((uint16_t)0x0004) 87 #define BKP_DR2 ((uint16_t)0x0008) 88 #define BKP_DR3 ((uint16_t)0x000C) 89 #define BKP_DR4 ((uint16_t)0x0010) 90 #define BKP_DR5 ((uint16_t)0x0014) 91 #define BKP_DR6 ((uint16_t)0x0018) 92 #define BKP_DR7 ((uint16_t)0x001C) 93 #define BKP_DR8 ((uint16_t)0x0020) 94 #define BKP_DR9 ((uint16_t)0x0024) 95 #define BKP_DR10 ((uint16_t)0x0028) 96 #define BKP_DR11 ((uint16_t)0x0040) 97 #define BKP_DR12 ((uint16_t)0x0044) 98 #define BKP_DR13 ((uint16_t)0x0048) 99 #define BKP_DR14 ((uint16_t)0x004C) 100 #define BKP_DR15 ((uint16_t)0x0050) 101 #define BKP_DR16 ((uint16_t)0x0054) 102 #define BKP_DR17 ((uint16_t)0x0058) 103 #define BKP_DR18 ((uint16_t)0x005C) 104 #define BKP_DR19 ((uint16_t)0x0060) 105 #define BKP_DR20 ((uint16_t)0x0064) 106 #define BKP_DR21 ((uint16_t)0x0068) 107 #define BKP_DR22 ((uint16_t)0x006C) 108 #define BKP_DR23 ((uint16_t)0x0070) 109 #define BKP_DR24 ((uint16_t)0x0074) 110 #define BKP_DR25 ((uint16_t)0x0078) 111 #define BKP_DR26 ((uint16_t)0x007C) 112 #define BKP_DR27 ((uint16_t)0x0080) 113 #define BKP_DR28 ((uint16_t)0x0084) 114 #define BKP_DR29 ((uint16_t)0x0088) 115 #define BKP_DR30 ((uint16_t)0x008C) 116 #define BKP_DR31 ((uint16_t)0x0090) 117 #define BKP_DR32 ((uint16_t)0x0094) 118 #define BKP_DR33 ((uint16_t)0x0098) 119 #define BKP_DR34 ((uint16_t)0x009C) 120 #define BKP_DR35 ((uint16_t)0x00A0) 121 #define BKP_DR36 ((uint16_t)0x00A4) 122 #define BKP_DR37 ((uint16_t)0x00A8) 123 #define BKP_DR38 ((uint16_t)0x00AC) 124 #define BKP_DR39 ((uint16_t)0x00B0) 125 #define BKP_DR40 ((uint16_t)0x00B4) 126 #define BKP_DR41 ((uint16_t)0x00B8) 127 #define BKP_DR42 ((uint16_t)0x00BC) 129 #define IS_BKP_DR(DR) (((DR) == BKP_DR1) || ((DR) == BKP_DR2) || ((DR) == BKP_DR3) || \ 130 ((DR) == BKP_DR4) || ((DR) == BKP_DR5) || ((DR) == BKP_DR6) || \ 131 ((DR) == BKP_DR7) || ((DR) == BKP_DR8) || ((DR) == BKP_DR9) || \ 132 ((DR) == BKP_DR10) || ((DR) == BKP_DR11) || ((DR) == BKP_DR12) || \ 133 ((DR) == BKP_DR13) || ((DR) == BKP_DR14) || ((DR) == BKP_DR15) || \ 134 ((DR) == BKP_DR16) || ((DR) == BKP_DR17) || ((DR) == BKP_DR18) || \ 135 ((DR) == BKP_DR19) || ((DR) == BKP_DR20) || ((DR) == BKP_DR21) || \ 136 ((DR) == BKP_DR22) || ((DR) == BKP_DR23) || ((DR) == BKP_DR24) || \ 137 ((DR) == BKP_DR25) || ((DR) == BKP_DR26) || ((DR) == BKP_DR27) || \ 138 ((DR) == BKP_DR28) || ((DR) == BKP_DR29) || ((DR) == BKP_DR30) || \ 139 ((DR) == BKP_DR31) || ((DR) == BKP_DR32) || ((DR) == BKP_DR33) || \ 140 ((DR) == BKP_DR34) || ((DR) == BKP_DR35) || ((DR) == BKP_DR36) || \ 141 ((DR) == BKP_DR37) || ((DR) == BKP_DR38) || ((DR) == BKP_DR39) || \ 142 ((DR) == BKP_DR40) || ((DR) == BKP_DR41) || ((DR) == BKP_DR42)) 144 #define IS_BKP_CALIBRATION_VALUE(VALUE) ((VALUE) <= 0x7F)
FlagStatus BKP_GetFlagStatus(void)
Checks whether the Tamper Pin Event flag is set or not.
void BKP_ClearITPendingBit(void)
Clears Tamper Pin Interrupt pending bit.
void BKP_SetRTCCalibrationValue(uint8_t CalibrationValue)
Sets RTC Clock Calibration value.
uint16_t BKP_ReadBackupRegister(uint16_t BKP_DR)
Reads data from the specified Data Backup Register.
void BKP_RTCOutputConfig(uint16_t BKP_RTCOutputSource)
Select the RTC output source to output on the Tamper pin.
void BKP_TamperPinLevelConfig(uint16_t BKP_TamperPinLevel)
Configures the Tamper Pin active level.
void BKP_ITConfig(FunctionalState NewState)
Enables or disables the Tamper Pin Interrupt.
void BKP_ClearFlag(void)
Clears Tamper Pin Event pending flag.
ITStatus BKP_GetITStatus(void)
Checks whether the Tamper Pin Interrupt has occurred or not.
void BKP_TamperPinCmd(FunctionalState NewState)
Enables or disables the Tamper Pin activation.
CMSIS Cortex-M3 Device Peripheral Access Layer Header File. This file contains all the peripheral reg...
void BKP_WriteBackupRegister(uint16_t BKP_DR, uint16_t Data)
Writes user data to the specified Data Backup Register.
void BKP_DeInit(void)
Deinitializes the BKP peripheral registers to their default reset values.