/* Get the captured data for a sample sequence.  */
unsigned long xADCDataGet(unsigned long ulBase, unsigned long *pulBuffer)
/* Get the captured data for a sample sequence.  */
unsigned long xADCDataGet(unsigned long ulBase, unsigned long *pulBuffer)
{
    unsigned long ulValid = 0;
    unsigned long ulWrite;
    xASSERT(ulBase == ADC_BASE);
    xASSERT(pulBuffer != 0);
    do
    {
        ulValid = (xHWREG(ulBase + ADC0_SC1A) & ADC0_SC1A_COCO_FLAG) >> 7;
    } while(!ulValid);
    ulWrite = 0;
    pulBuffer[ulWrite++] = xHWREG(ulBase + ADC0_RA);
    return ulWrite;
}