/* Checks whether the specified RCC flag is set or not.  */
FlagStatus RCC_GetFlagStatus(uint8_t RCC_FLAG)
/* Checks whether the specified RCC flag is set or not.  */
FlagStatus RCC_GetFlagStatus(uint8_t RCC_FLAG)
{
  uint32_t tmp = 0;
  uint32_t statusreg = 0;
  FlagStatus bitstatus = RESET;
  assert_param(IS_RCC_FLAG(RCC_FLAG));
  tmp = RCC_FLAG >> 5;
  if (tmp == 1)
  {
    statusreg = RCC->CR;
  }
  else if (tmp == 2)
  {
    statusreg = RCC->BDCR;
  }
  else
  {
    statusreg = RCC->CSR;
  }
  tmp = RCC_FLAG & FLAG_Mask;
  if ((statusreg & ((uint32_t)1 << tmp)) != (uint32_t)RESET)
  {
    bitstatus = SET;
  }
  else
  {
    bitstatus = RESET;
  }
  return bitstatus;
}