Clearing serial buffer solved

I'm still of the opinion that any attempt to 'flush' the serial input buffer is flawed thinking as one has no control over what and when new serial data my arrive, possibly even between the ending of the flushing function but before returning to further processing that assumes the input buffer is empty when it's possible it is not, esp at the higher baud rates.

I think this kind of requirement is better met by 'building' it into the serial protocol so that one can simply throw away all characters until a valid start of packet character is read and then save characters until you get a valid end of packet character. So build the structure into the protocol rather then assuming what may or may not arrive or assuming what data you don't need even though you haven't determine what those flushed characters might represent.

Recall that the older arduino flushing function did clear the serial input buffer, but they changed it around IDE => 1.0 to flush only the output transmit buffer and left no function to clear the input buffer. If it was a useful or logical function why would they remove that functionality? I certainly am open to what others may have to say on this subject.

Lefty