I noticed the double buffering as well when I prepared one of my last builds but didn't want to change it at that moment for fear of making things unstable. All this predates my involvement. But yes, needs to be ripped out!
How big is the queue provided by jshPushIOCharEvents? The HW UART queue is 128 chars, so we need to be able to buffer at least that much. The interrupt triggers when it holds 80 (or it's idle a couple of char periods). IIRC the IO Events queue is only 64.
(I'd make the changes to get serial working if I had time but I'm slammed right now. Testing these changes does take a chunk of time, specially since I usually make a mistake or two to start with :-).
© Espruino, powered by microcosm.
Report a problem