/* Write data element to the SPI interface with block. This function transmitted data to the interface of the specified SPI module with block. when the TX and TX shift are both empty or in FIFO mode the TX FIFO depth is equal to or less than the trigger level, the data element can be transmitted, otherwise the data element will be blocked until can be transmitted.  */
void xSPIDataPut(unsigned long ulBase, unsigned long ulData)
/* Write data element to the SPI interface with block. This function transmitted data to the interface of the specified SPI module with block. when the TX and TX shift are both empty or in FIFO mode the TX FIFO depth is equal to or less than the trigger level, the data element can be transmitted, otherwise the data element will be blocked until can be transmitted.  */
void xSPIDataPut(unsigned long ulBase, unsigned long ulData)
{
    xASSERT(ulBase == SPI0_BASE);
    while(0 == (xHWREG(ulBase + S0SPSR) & S0SPSR_SPIF));
    xHWREG(ulBase + S0SPDR) = ulData & S0SPDR_DATA_M;
}