/* Check the busy status of the specified SPI port.  */
xtBoolean xSPIIsBusy(unsigned long ulBase)
/* Check the busy status of the specified SPI port.  */
xtBoolean xSPIIsBusy(unsigned long ulBase)
{
    xASSERT((ulBase == SPI0_BASE) || (ulBase == SPI1_BASE)||
            (ulBase == SPI2_BASE)||(ulBase == SPI3_BASE) );
    return ((xHWREG(ulBase + SPI_STATUS) & SPI_STATUS_BUSY) ? xtrue : xfalse);
}