/* Clear the overflow condition on the ADC sample sequence.  */
void xADCOverflowClear(unsigned long ulBase)
/* Clear the overflow condition on the ADC sample sequence.  */
void xADCOverflowClear(unsigned long ulBase)
{
    unsigned long i;
    unsigned long ulOverRunChannels;
    volatile unsigned long ulDump;
    xASSERT(ulBase == ADC_BASE);
    ulOverRunChannels = (xHWREG(ulBase + ADC_SR) & ADC_SR_OVERRUN_M) >> 
                        ADC_SR_OVERRUN_S;
    for(i = 0; i < 8; i++)
    {
        if(ulOverRunChannels & (1 << i))
        {
            ulDump = xHWREG(ulBase + ADC_DR0 + (4 * i));    
        }
    }
}