/* Waits for a character from the specified port.  */
unsigned char UARTCharGet(unsigned long ulBase)
/* Waits for a character from the specified port.  */
unsigned char UARTCharGet(unsigned long ulBase)
{
    unsigned long          ulChar   = 0;
    volatile unsigned char ulStatus = 0;
    xASSERT((ulBase == UART0_BASE) || (ulBase == UART1_BASE) ||
            (ulBase == UART2_BASE) );
    do
    {
        ulStatus = xHWREGB(ulBase + UART_012_S1) &
                   ((unsigned char ) UART_012_S1_RDRF_MASK);
    }while(0 == ulStatus);
    ulChar = xHWREGB(ulBase + UART_012_D);
    return (ulChar);
}