/* Gets a data element from the SPI interface with Noblock.  */
long xSPIDataGetNonBlocking(unsigned long ulBase, unsigned long *pulData)
/* Gets a data element from the SPI interface with Noblock.  */
long xSPIDataGetNonBlocking(unsigned long ulBase, unsigned long *pulData)
{
    unsigned long ulTemp;
    unsigned char ucBitLength = SPIBitLengthGet(ulBase);
    xASSERT(ulBase == SPI0_BASE);
    ulTemp = xHWREG(ulBase + SPI_SR) & SPI_SR_RXBNE;
	if(!ulTemp)
	{
	    return 0;
	}
	if(ucBitLength <= 8 && ucBitLength != 0)
	{
	    *pulData = xHWREG(ulBase + SPI_DR);
	}
	else
	{
	    *pulData = xHWREG(ulBase + SPI_DR);
	}
	return 1;
}