Go Down

Topic: Suggested enhancement for HardwareSerial (Read 683 times) previous topic - next topic


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.


Coding Badly

Go Up