An alternative Serial Library for Arduino 1.0

For receive parity errors it would be difficult to flag each character since I buffer 8-bits. I could set a flag indicating a parity error occurred in some character and the user could check and clear it. Is that adequate?

Any step forward is OK :slight_smile:

The avr USART is capable of character sizes of 5, 6, 7, 8, and 9 bits. Nine data bits would be difficult since I use an 8-bit data type for ring buffers.

Don't lnow of any device using 9 databits (never used it either) so don't care about that one. The 5,6,7 are still interesting.

The # stopbits support sounds good too! Do you have a link to a PDF describing the USART?
Stopbits come from a time where devices needed time to process the incoming data (think mechanical teletypes), and to be sure to give them enough time. Zero stopbits came in when local buffering removed that need.

I am familiar with your (great!) highspeed SD work so now I understand your 16 bit int choice better (add this rationale in the readme file ?)

You can't access the ring buffer when there is no buffer. It is possible that the ring buffer doesn't exist if BUFFERED_RX is zero.

You're right, I missed that in my quick review

New code looks better imho, well done!