/* Gets a data element from the SPI receive FIFO.  */
void SPIDataGet(unsigned long ulBase, unsigned long *pulData)
/* Gets a data element from the SPI receive FIFO.  */
void SPIDataGet(unsigned long ulBase, unsigned long *pulData)
{
    xASSERT((ulBase == SPI3_BASE) || (ulBase == SPI1_BASE)||
            (ulBase == SPI2_BASE));
    while(!(xHWREG(ulBase + SPI_SR) & SPI_SR_RXNE))
    {
    }
    *pulData = xHWREG(ulBase + SPI_DR);
}