/* Puts a data element into the SPI transmit FIFO.  */
void SPIDataPut(unsigned long ulBase, unsigned long ulData)
/* Puts a data element into the SPI transmit FIFO.  */
void SPIDataPut(unsigned long ulBase, unsigned long ulData)
{
    xASSERT((ulBase == SPI3_BASE) || (ulBase == SPI1_BASE)||
            (ulBase == SPI2_BASE));
    while(!(xHWREG(ulBase + SPI_SR) & SPI_SR_TXE))
    {
    }
    xHWREG(ulBase + SPI_DR) = ulData;
}