Do not flush the input and output buffers when configuring the device.

This commit is contained in:
Jef Driesen 2007-11-29 09:08:25 +00:00
parent 40835b8d80
commit b9a43e3157
2 changed files with 0 additions and 12 deletions

View File

@ -277,12 +277,6 @@ serial_configure (serial *device, int baudrate, int databits, int parity, int st
return -1;
}
// Flush the input and output buffers.
if (tcflush (device->fd, TCIOFLUSH) != 0) {
TRACE ("tcflush");
return -1;
}
// Apply the new settings.
if (tcsetattr (device->fd, TCSANOW, &tty) != 0) {
TRACE ("tcsetattr");

View File

@ -246,12 +246,6 @@ serial_configure (serial *device, int baudrate, int databits, int parity, int st
return -1;
}
// Flush the input and output buffers.
if (!PurgeComm (device->hFile, PURGE_RXABORT | PURGE_RXCLEAR | PURGE_TXABORT | PURGE_TXCLEAR)) {
TRACE ("PurgeComm");
return -1;
}
// Apply the new settings.
if (!SetCommState (device->hFile, &dcb)) {
TRACE ("SetCommState");