/* Read RX register using non-blocking method. 
This function reads data from the TX register directly, upper layer must make sure the RX register is full or TX FIFO has data before calling this function. */
static void UART_ReadNonBlocking(UART_Type *base, uint8_t *data, size_t length)
/* Read RX register using non-blocking method. 
This function reads data from the TX register directly, upper layer must make sure the RX register is full or TX FIFO has data before calling this function. */
static void UART_ReadNonBlocking(UART_Type *base, uint8_t *data, size_t length)
{
    assert(data);
    size_t i;
    for (i = 0; i < length; i++)
    {
        data[i] = base->D;
    }
}