You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The currently available implementation of HardwareSerial is very primitive and is based on polling.
Especially when sending data, this causes unnecessary blocking of the program's execution of other tasks.
A DMA-based implementation, although it would relieve the CPU, will not be optimal for the variable amount of data transferred, hence I propose a traditional interrupt-based implementation.
The text was updated successfully, but these errors were encountered:
@tanakamasayuki proposed PR #79 as a simple improvement to implement available() and also suggested using interrupts, illustrated with some code.
+1 for a nice interrupt based implementation. I'm in favor of anything better, but currently prefer small code size, since I found use of the limited flash on the CH32V003 the most prevalent issue in my projects...
Just a moment ago i submitted PR #145, which implements interrupt driven serial1. It enables Serial.available(), Serial.peek() and improves Serial.read(). Tested mainly on CH32V003, but also confirmed to work on CH32X035. Would be nice if someone could test other CH32 chips.
The currently available implementation of HardwareSerial is very primitive and is based on polling.
Especially when sending data, this causes unnecessary blocking of the program's execution of other tasks.
A DMA-based implementation, although it would relieve the CPU, will not be optimal for the variable amount of data transferred, hence I propose a traditional interrupt-based implementation.
The text was updated successfully, but these errors were encountered: