Serial.XmitWait Method
Waits until all data sent to the serial port with the Write method has been sent.
Syntax