/* Get the captured data for the ADC sample channel.  */
unsigned long ADCDataGet(unsigned long ulBase)
/* Get the captured data for the ADC sample channel.  */
unsigned long ADCDataGet(unsigned long ulBase)
{
    unsigned long ulData = 0;
    unsigned long ulValid = 0;
    xASSERT(ulBase == ADC_BASE);
    do
    {
        ulValid = (xHWREG(ulBase + ADC0_SC1A) & ADC0_SC1A_COCO_FLAG) >> 7;
    } while(!ulValid);
    ulData = xHWREG(ulBase + ADC0_RA);
    return ulData;
}