/* Puts a null terminaled string in the buffer or directly to the fifo.  */
void am_hal_uart_string_transmit_buffered(uint32_t ui32Module, char *pcString)
/* Puts a null terminaled string in the buffer or directly to the fifo.  */
void am_hal_uart_string_transmit_buffered(uint32_t ui32Module, char *pcString)
{
    while (*pcString)
    {
        if (am_hal_queue_empty(&g_psTxQueue[ui32Module]) &&
            !AM_BFRn(UART, ui32Module, FR, TXFF))
        {
            AM_REGn(UART, ui32Module, DR) = *pcString;
        }
        else
        {
            am_hal_queue_item_add(&g_psTxQueue[ui32Module], pcString, 1);
        }
        pcString++;
    }
}