/* Gets a data element from the SPI interface with block. This function gets received data from the interface of the specified SPI module with block. when the RX not empty flag is set, the data element can be transmitted, otherwise the data element will be blocked until can be transmitted.  */
void xSPIDataGet(unsigned long ulBase, unsigned long *pulData)
/* Gets a data element from the SPI interface with block. This function gets received data from the interface of the specified SPI module with block. when the RX not empty flag is set, the data element can be transmitted, otherwise the data element will be blocked until can be transmitted.  */
void xSPIDataGet(unsigned long ulBase, unsigned long *pulData)
{
    xASSERT(ulBase == SPI0_BASE);
    xASSERT(pulData != 0);
    while(0 == (xHWREG(ulBase + S0SPSR) & S0SPSR_SPIF));
    *pulData = xHWREG(ulBase + S0SPDR) & S0SPDR_DATA_M;
}