/* Checks whether the specified RCC flag is set or not.  */
FlagStatus RCC_GetFlagStatus(RCC_FLAG_TypeDef flag)
/* Checks whether the specified RCC flag is set or not.  */
FlagStatus RCC_GetFlagStatus(RCC_FLAG_TypeDef flag)
{
    return ((((flag >> 5) == CR_REG_INDEX) ? RCC->CR : (((flag >> 5) == BDCR_REG_INDEX) ? RCC->BDCR : RCC->CSR)) &
            (1 << (flag & 0x1F)))
           ? SET : RESET;
}