/*********************************************************************************************************************** * Function Name: r_uart2_interrupt_receive * Description : This function is INTSR2 interrupt service routine. * Arguments : None * Return Value : None ***********************************************************************************************************************/ void r_uart2_interrupt_receive(void) { uint8_t rx_data; uint8_t err_type; err_type = (uint8_t)(SSR11 & 0x0007U); SIR11 = (uint16_t)err_type; if (err_type != 0U) { r_uart2_callback_error(err_type); } rx_data = RXD2; if (g_uart2_rx_length > g_uart2_rx_count) { *gp_uart2_rx_address = rx_data; gp_uart2_rx_address++; g_uart2_rx_count++; if (g_uart2_rx_length == g_uart2_rx_count) { r_uart2_callback_receiveend(); } } else { r_uart2_callback_softwareoverrun(rx_data); } }
/*********************************************************************************************************************** * Function Name: r_uart2_interrupt_receive * Description : This function is INTSR2 interrupt service routine. * Arguments : None * Return Value : None ***********************************************************************************************************************/ void r_uart2_interrupt_receive(void) { uint8_t rx_data; uint8_t err_type; err_type = (uint8_t)(SSR11 & 0x0007U); SIR11 = (uint16_t)err_type; rx_data = RXD2; if (g_uart2_rx_length > g_uart2_rx_count) { *gp_uart2_rx_address = rx_data; gp_uart2_rx_address++; g_uart2_rx_count++; if (g_uart2_rx_length == g_uart2_rx_count) { r_uart2_callback_receiveend(); } } }