/* See mss_uart.h for details of how to use this function.  */
void MSS_UART_set_rx_handler(mss_uart_instance_t *this_uart, mss_uart_rx_handler_t handler, mss_uart_rx_trig_level_t trigger_level)
/* See mss_uart.h for details of how to use this function.  */
void MSS_UART_set_rx_handler(mss_uart_instance_t *this_uart, mss_uart_rx_handler_t handler, mss_uart_rx_trig_level_t trigger_level)
{
    ASSERT( (this_uart == &g_mss_uart0) || (this_uart == &g_mss_uart1) );
    this_uart->rx_handler = handler;
    this_uart->hw_reg->FCR = (this_uart->hw_reg->FCR & (uint8_t)(~((uint8_t)FCR_TRIG_LEVEL_MASK))) | (uint8_t)trigger_level;
    this_uart->hw_reg_bit->IER_ERBFI = 1U;
    NVIC_EnableIRQ( this_uart->irqn );
}