/* Write to TX register using non-blocking method. 
This function writes data to the TX register directly, upper layer must make sure the TX register is empty or TX FIFO has empty room before calling this function. */
static void UART_WriteNonBlocking(UART_Type *base, const uint8_t *data, size_t length)
/* Write to TX register using non-blocking method. 
This function writes data to the TX register directly, upper layer must make sure the TX register is empty or TX FIFO has empty room before calling this function. */
static void UART_WriteNonBlocking(UART_Type *base, const uint8_t *data, size_t length)
{
    assert(data);
    size_t i;
    for (i = 0; i < length; i++)
    {
        base->D = data[i];
    }
}