/*----------------------------标准外设库----------------------------*//**
* @brief Writes a data in a specified RTC Backup data register.
* @param RTC_BKP_DR: RTC Backup data Register number.
* This parameter can be: RTC_BKP_DRx where x can be from 0 to 19 to
* specify the register.
* @param Data: Data to be written in the specified RTC Backup data register.
* @retval None
*/voidRTC_WriteBackupRegister(uint32_t RTC_BKP_DR, uint32_t Data){
__IO uint32_t tmp =0;/* Check the parameters */assert_param(IS_RTC_BKP(RTC_BKP_DR));
tmp = RTC_BASE +0x50;
tmp +=(RTC_BKP_DR *4);/* Write the specified register */*(__IO uint32_t *)tmp =(uint32_t)Data;}/**
* @brief Reads data from the specified RTC Backup data Register.
* @param RTC_BKP_DR: RTC Backup data Register number.
* This parameter can be: RTC_BKP_DRx where x can be from 0 to 19 to
* specify the register.
* @retval None
*/
uint32_t RTC_ReadBackupRegister(uint32_t RTC_BKP_DR){
__IO uint32_t tmp =0;/* Check the parameters */assert_param(IS_RTC_BKP(RTC_BKP_DR));
tmp = RTC_BASE +0x50;
tmp +=(RTC_BKP_DR *4);/* Read the specified register */return(*(__IO uint32_t *)tmp);}/*----------------------------HAL库----------------------------*//**
* @brief Writes a data in a specified RTC Backup data register.
* @param hrtc: pointer to a RTC_HandleTypeDef structure that contains
* the configuration information for RTC.
* @param BackupRegister: RTC Backup data Register number.
* This parameter can be: RTC_BKP_DRx where x can be from 0 to 19 to
* specify the register.
* @param Data: Data to be written in the specified RTC Backup data register.
* @retval None
*/voidHAL_RTCEx_BKUPWrite(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister, uint32_t Data){
uint32_t tmp =0U;/* Check the parameters */assert_param(IS_RTC_BKP(BackupRegister));
tmp =(uint32_t)&(hrtc->Instance->BKP0R);
tmp +=(BackupRegister *4U);/* Write the specified register */*(__IO uint32_t *)tmp =(uint32_t)Data;}/**
* @brief Reads data from the specified RTC Backup data Register.
* @param hrtc: pointer to a RTC_HandleTypeDef structure that contains
* the configuration information for RTC.
* @param BackupRegister: RTC Backup data Register number.
* This parameter can be: RTC_BKP_DRx where x can be from 0 to 19 to
* specify the register.
* @retval Read value
*/
uint32_t HAL_RTCEx_BKUPRead(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister){
uint32_t tmp =0U;/* Check the parameters */assert_param(IS_RTC_BKP(BackupRegister));
tmp =(uint32_t)&(hrtc->Instance->BKP0R);
tmp +=(BackupRegister *4U);/* Read the specified register */return(*(__IO uint32_t *)tmp);}