/* Waits to send a character from the specified port.  */
void UARTBufferWrite(unsigned long ulBase, unsigned char *ucBuffer, unsigned long ulLength)
/* Waits to send a character from the specified port.  */
void UARTBufferWrite(unsigned long ulBase, unsigned char *ucBuffer, unsigned long ulLength)
{
    unsigned long ulCount;
    xASSERT(UARTBaseValid(ulBase));
    for (ulCount=0; ulCount<ulLength; ulCount++)
    {
        while(!(xHWREG(ulBase + USART_LSR) & USART_LSR_TX_FIFO_EMPTY))
        {
        }
        xHWREG(ulBase + USART_THR) = ucBuffer[ulCount];
    }
}