/* Puts a char in the buffer or directly to the fifo if available.  */
void am_hal_uart_char_transmit_buffered(uint32_t ui32Module, char cChar)
/* Puts a char in the buffer or directly to the fifo if available.  */
void am_hal_uart_char_transmit_buffered(uint32_t ui32Module, char cChar)
{
    if (am_hal_queue_empty(&g_psTxQueue[ui32Module]) &&
        !AM_BFRn(UART, ui32Module, FR, TXFF))
    {
        AM_REGn(UART, ui32Module, DR) = cChar;
    }
    else
    {
        am_hal_queue_item_add(&g_psTxQueue[ui32Module], &cChar, 1);
    }
}