/* 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)
{
    xASSERT(UARTBaseValid(ulBase));
    while(!(xHWREG(ulBase + USART_SR) & USART_SR_RXNE))
    {
    }
    return(xHWREG(ulBase + USART_DR));
}