/* Waits for a character from the specified port. */
long UARTCharGet(unsigned long ulBase)
/* Waits for a character from the specified port. */
long UARTCharGet(unsigned long ulBase)
{
    ASSERT(UARTBaseValid(ulBase));
    while(HWREG(ulBase + UART_O_FR) & UART_FR_RXFE)
    {
    }
    return(HWREG(ulBase + UART_O_DR));
}