This PR reintroduces a read buffer for reading serial1 input using a hardware interrupt.
The read buffer allows for proper implementation of serial.available() and serial.peek().
It also prevents loosing serial input data received when the processor is doing something else.
This PR was tested mainly on the CH32V003 and confirmed to also work on the CH32X035. Other processors may work as well, but have not been tested. The current implementation only supports the serial1 interface.
This PR reintroduces a read buffer for reading serial1 input using a hardware interrupt. The read buffer allows for proper implementation of serial.available() and serial.peek(). It also prevents loosing serial input data received when the processor is doing something else.
This PR was tested mainly on the CH32V003 and confirmed to also work on the CH32X035. Other processors may work as well, but have not been tested. The current implementation only supports the serial1 interface.