Suggested enhancement for HardwareSerial

It would be very simple to add a new method to the HardwareSerial class. The new method could be called 'txready' or something similar. It would return true if the transmit data register is empty.

This way, a sketch could check to see if the UART is ready for another character before calling Serial.write(). The way it works now, a call to Serial.write() could wait while the last character shifts out. With Serial.txready(), your sketch could be doing other things while a character is being transmitted.

-Mike

I like the idea.