With the new code, how would it decide when to call the callback? Right now, there's no ambiguity - it calls it after every byte (as I understand). What criteria will it use to decide when to call the callback, if it's receiving data a few bytes at a time.
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.
This sounds good to me.
With the new code, how would it decide when to call the callback? Right now, there's no ambiguity - it calls it after every byte (as I understand). What criteria will it use to decide when to call the callback, if it's receiving data a few bytes at a time.