?? stm32f10x_bkp.lst
字號:
138 /*******************************************************************************
139 * Function Name : BKP_RTCCalibrationClockOutputCmd
140 * Description : Enables or disables the output of the Calibration Clock.
141 * Input : - NewState: new state of the Calibration Clock output.
142 * This parameter can be: ENABLE or DISABLE.
143 * Output : None
144 * Return : None
145 *******************************************************************************/
146 void BKP_RTCCalibrationClockOutputCmd(FunctionalState NewState)
147 {
148 /* Check the parameters */
149 assert(IS_FUNCTIONAL_STATE(NewState));
150
151 *(vu32 *) RTCCR_CCO_BB = (u32)NewState;
152 }
153
154 /*******************************************************************************
155 * Function Name : BKP_SetRTCCalibrationValue
156 * Description : Sets RTC Clock Calibration value.
157 * Input : - CalibrationValue: specifies the RTC Clock Calibration value.
158 * This parameter must be a number between 0 and 0x7F.
159 * Output : None
160 * Return : None
161 *******************************************************************************/
162 void BKP_SetRTCCalibrationValue(u8 CalibrationValue)
163 {
164 u16 tmpreg = 0;
165
166 /* Check the parameters */
167 assert(IS_BKP_CALIBRATION_VALUE(CalibrationValue));
168
169 tmpreg = BKP->RTCCR;
170
171 /* Clear CAL[6:0] bits */
172 tmpreg &= RTCCR_CAL_Mask;
173
174 /* Set CAL[6:0] bits according to CalibrationValue value */
175 tmpreg |= CalibrationValue;
176
177 /* Store the new value */
178 BKP->RTCCR = tmpreg;
179 }
180
181 /*******************************************************************************
182 * Function Name : BKP_WriteBackupRegister
183 * Description : Writes user data to the specified Data Backup Register.
184 * Input : - BKP_DR: specifies the Data Backup Register.
185 * This parameter can be BKP_DRx where x:[1, 10]
186 * - Data: data to write
187 * Output : None
188 * Return : None
189 *******************************************************************************/
190 void BKP_WriteBackupRegister(u16 BKP_DR, u16 Data)
191 {
192 /* Check the parameters */
193 assert(IS_BKP_DR(BKP_DR));
194
195 *(vu16 *) (BKP_BASE + BKP_DR) = Data;
196 }
197
198 /*******************************************************************************
199 * Function Name : BKP_ReadBackupRegister
200 * Description : Reads data from the specified Data Backup Register.
201 * Input : - BKP_DR: specifies the Data Backup Register.
202 * This parameter can be BKP_DRx where x:[1, 10]
203 * Output : None
204 * Return : The content of the specified Data Backup Register
205 *******************************************************************************/
206 u16 BKP_ReadBackupRegister(u16 BKP_DR)
207 {
208 /* Check the parameters */
209 assert(IS_BKP_DR(BKP_DR));
210
211 return (*(vu16 *) (BKP_BASE + BKP_DR));
212 }
213
214 /*******************************************************************************
215 * Function Name : BKP_GetFlagStatus
216 * Description : Checks whether the Tamper Pin Event flag is set or not.
217 * Input : None
218 * Output : None
219 * Return : The new state of the Tamper Pin Event flag (SET or RESET).
220 *******************************************************************************/
221 FlagStatus BKP_GetFlagStatus(void)
222 {
223 return (FlagStatus)(*(vu32 *) CSR_TEF_BB);
224 }
225
226 /*******************************************************************************
227 * Function Name : BKP_ClearFlag
228 * Description : Clears Tamper Pin Event pending flag.
229 * Input : None
230 * Output : None
231 * Return : None
232 *******************************************************************************/
233 void BKP_ClearFlag(void)
234 {
235 /* Set CTE bit to clear Tamper Pin Event flag */
236 BKP->CSR |= CSR_CTE_Set;
237 }
238
239 /*******************************************************************************
240 * Function Name : BKP_GetITStatus
241 * Description : Checks whether the Tamper Pin Interrupt has occurred or not.
242 * Input : None
243 * Output : None
244 * Return : The new state of the Tamper Pin Interrupt (SET or RESET).
245 *******************************************************************************/
246 ITStatus BKP_GetITStatus(void)
247 {
248 return (ITStatus)(*(vu32 *) CSR_TIF_BB);
249 }
250
251 /*******************************************************************************
252 * Function Name : BKP_ClearITPendingBit
253 * Description : Clears Tamper Pin Interrupt pending bit.
254 * Input : None
255 * Output : None
256 * Return : None
257 *******************************************************************************/
258 void BKP_ClearITPendingBit(void)
259 {
260 /* Set CTI bit to clear Tamper Pin Interrupt pending bit */
261 BKP->CSR |= CSR_CTI_Set;
262 }
263
264 /******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/
Maximum stack usage in bytes:
Function CSTACK
-------- ------
BKP_ClearFlag 0
BKP_ClearITPendingBit 0
BKP_DeInit 4
BKP_GetFlagStatus 0
BKP_GetITStatus 0
BKP_ITConfig 8
BKP_RTCCalibrationClockOutputCmd
8
BKP_ReadBackupRegister 8
BKP_SetRTCCalibrationValue 8
BKP_TamperPinCmd 8
BKP_TamperPinLevelConfig 8
BKP_WriteBackupRegister 12
Segment part sizes:
Function/Label Bytes
-------------- -----
BKP_DeInit 16
BKP_TamperPinLevelConfig 32
BKP_TamperPinCmd 32
BKP_ITConfig 32
BKP_RTCCalibrationClockOutputCmd
32
BKP_SetRTCCalibrationValue 48
BKP_WriteBackupRegister 60
BKP_ReadBackupRegister 62
BKP_GetFlagStatus 16
BKP_ClearFlag 18
BKP_GetITStatus 16
BKP_ClearITPendingBit 18
??DataTable9 4
??DataTable10 4
??DataTable14 4
?<Constant "C:\\David JIANG\\ST MCU...">
88
Others 16
410 bytes in segment CODE
88 bytes in segment DATA_C
394 bytes of CODE memory (+ 16 bytes shared)
88 bytes of CONST memory
Errors: none
Warnings: none
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -