/* Checks whether the specified RTC flag is set or not.  */
FlagStatus RTC_GetFlagStatus(RTC_Flag_TypeDef RTC_FLAG)
/* Checks whether the specified RTC flag is set or not.  */
FlagStatus RTC_GetFlagStatus(RTC_Flag_TypeDef RTC_FLAG)
{
  FlagStatus flagstatus = RESET;
  uint16_t tmpreg1 = 0;
  uint16_t tmpreg2 = 0;
  assert_param(IS_RTC_GET_FLAG(RTC_FLAG));
  tmpreg2 = (uint16_t)((uint16_t)RTC->ISR1 << 8);
  tmpreg1 = (uint16_t)((uint16_t)((uint16_t)(RTC->ISR2)) | tmpreg2);
  if ((tmpreg1 & (uint16_t)RTC_FLAG) != RESET)
  {
    flagstatus = SET;
  }
  else
  {
    flagstatus = RESET;
  }
  return (FlagStatus)flagstatus;
}