Hmm - yes, it's possible something like that could be implemented... Node.js has the drain event that could be similar. Serial.write could return false if the output buffer got over halfway full, and then the drain event could be called.
I guess doing it that way would mean you could just pipe data to Serial.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hmm - yes, it's possible something like that could be implemented... Node.js has the drain event that could be similar.
Serial.write
could return false if the output buffer got over halfway full, and then the drain event could be called.I guess doing it that way would mean you could just pipe data to Serial.