/* Gets a data element from the SPI interface with block.  */
void xSPIDataGet(unsigned long ulBase, unsigned long *pulData)
/* Gets a data element from the SPI interface with block.  */
void xSPIDataGet(unsigned long ulBase, unsigned long *pulData)
{
    unsigned char ucBitLength = SPIBitLengthGet(ulBase);
    xASSERT((ulBase == SPI0_BASE) || (ulBase == SPI1_BASE));
    while(!((xHWREG(ulBase + SPI_SR) & SPI_SR_RXBNE)))
    {
    }
    if (ucBitLength <= 8 && ucBitLength != 0 )
    {
        *pulData = xHWREG(ulBase + SPI_DR) & 0xFF;
    }
    else
    {
        *pulData = xHWREG(ulBase + SPI_DR) & 0xFFFF;
    } 
}