Serial RX Interrupt

Dear realtek
Is there any method to use Serial RX Interrupt instead of while(Serial.available()) {}

Hi @time4china,

In cores/ambpro2, there are several UART interfaces. The main files to look at are LOGUARTCLASS.cpp, UARTClassOne.cpp, UARTClassTwo.cpp and UARTClassTri.cpp. Inside each begin() method of these cpp, there is a serial rx interrupt handler being set. Right now there is no method exposed for you to use the interrupt from the arduino sketch itself. You can modify the functions arduino_loguart_irq_handler, arduino_uart_irq_handler to suit your needs.

Thank you.