/* See mss_uart.h for details of how to use this function.  */
size_t MSS_UART_get_rx(mss_uart_instance_t *this_uart, uint8_t *rx_buff, size_t buff_size)
/* See mss_uart.h for details of how to use this function.  */
size_t MSS_UART_get_rx(mss_uart_instance_t *this_uart, uint8_t *rx_buff, size_t buff_size)
{
    size_t rx_size = 0U;
    ASSERT( (this_uart == &g_mss_uart0) || (this_uart == &g_mss_uart1) );
    while (( this_uart->hw_reg_bit->LSR_DR != 0U) && ( rx_size < buff_size ) )
    {
        rx_buff[rx_size] = this_uart->hw_reg->RBR;
        ++rx_size;
    }
    return rx_size;
}