user1495: Is there a way to test whether the UART Tx buffer is empty without waiting? 
serial.flush() waits, so it won't help me. 
I tried looking into serial.SerialEvent(), but the link was broken on the Arduino reference page.  
Can anyone point me to a description of it? 

user313: It doesn't look like that function is implemented. The source for HardwareSerial.{cpp,h} are in /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino under OS-X. (Someone better versed in Window than I may have to chime in here to point you to that source location.)
Taking HardwareSerial::available() as a model, create a new function, say, HardwareSerial::txremaining(), that does the same thing, but for the transmit buffer.
Left as an exercise for the student:Make a common function that returns the contents of an arbitrary ring-buffer and use it in both ::available() and ::txremaining().

1495: <p>Is there a way to test whether the UART Tx buffer is empty without waiting? </p>

<p><code>serial.flush()</code> waits, so it won't help me. </p>

<p>I tried looking into <code>serial.SerialEvent()</code>, but the link was broken on the Arduino reference page.  </p>

<p>Can anyone point me to a description of it? </p>
 313: <p>It doesn't look like that function is implemented. The source for HardwareSerial.{cpp,h} are in <code>/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino</code> under OS-X. (Someone better versed in Window than I may have to chime in here to point you to that source location.)</p>

<p>Taking HardwareSerial::available() as a model, create a new function, say, HardwareSerial::txremaining(), that does the same thing, but for the transmit buffer.</p>

<p>Left as an exercise for the student:<br>Make a common function that returns the contents of an arbitrary ring-buffer and use it in both ::available() and ::txremaining().</p>
