/* Checks whether the specified ADC flag is set or not.  */
uint8_t ADC_ReadStatusFlag(ADC_FLAG_T flag)
/* Checks whether the specified ADC flag is set or not.  */
uint8_t ADC_ReadStatusFlag(ADC_FLAG_T flag)
{
    uint32_t status;
    if ((uint32_t)(flag & 0x01000000))
    {
        status = ADC->CTRL & 0xFEFFFFFF;
    }
    else
    {
        status = ADC->STS;
    }
    if ((status & flag) != (uint32_t)RESET)
    {
        return SET;
    }
    return RESET;
}