/* 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->CTRL;
    }
    else if (tmp == 2)
    {
       statusreg = RCC->LDCTRL;
    }
    else
    {
       statusreg = RCC->CTRLSTS;
    }
    tmp = RCC_FLAG & FLAG_MASK;
    if ((statusreg & ((uint32_t)1 << tmp)) != (uint32_t)RESET)
    {
       bitstatus = SET;
    }
    else
    {
       bitstatus = RESET;
    }
    return bitstatus;
}