/* Determines if there are any space in the transmit register.  */
xtBoolean UARTSpaceAvail(unsigned long ulBase)
/* Determines if there are any space in the transmit register.  */
xtBoolean UARTSpaceAvail(unsigned long ulBase)
{
    xtBoolean ulStatus = xfalse;
    xASSERT((ulBase == UART0_BASE) || (ulBase == UART1_BASE) ||
            (ulBase == UART2_BASE) );
    ulStatus = (xtBoolean)(xHWREGB(ulBase + UART_012_S1) &
                          ((unsigned char) UART_012_S1_TDRE_MASK));
    if(0 != ulStatus)
    {
        ulStatus = 1;
    }
    else
    {
        ulStatus = 0;
    }
    return (ulStatus);
}