/* 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 = xSPIBitLengthGet(ulBase);
    xASSERT(ulBase == SPI0_BASE);
    ulTemp = xHWREG(ulBase + SPI_CNTRL) & SPI_CNTRL_GO_BUSY;
    if(!ulTemp)
    {
        return 0;
    }
    if(ucBitLength <= 8 && ucBitLength != 0)
    {
        *pulData = xHWREG(ulBase + SPI_RX0);
    }
    else
    {
        *pulData = xHWREG(ulBase + SPI_RX0);
    }
    return 1;
}