/* Check the status of the Tx buffer of the specified SPI port.  */
xtBoolean SPIIsTxEmpty(unsigned long ulBase)
/* Check the status of the Tx buffer of the specified SPI port.  */
xtBoolean SPIIsTxEmpty(unsigned long ulBase)
{
    xASSERT((ulBase == SPI3_BASE) || (ulBase == SPI1_BASE)||
            (ulBase == SPI2_BASE));
    return ((xHWREG(ulBase + SPI_SR) & SPI_SR_TXE) ? xtrue : xfalse);
}