From b9a43e3157d14159b48437ba892672fc304f5c38 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Thu, 29 Nov 2007 09:08:25 +0000 Subject: [PATCH] Do not flush the input and output buffers when configuring the device. --- serial_posix.c | 6 ------ serial_win32.c | 6 ------ 2 files changed, 12 deletions(-) diff --git a/serial_posix.c b/serial_posix.c index 6c8e8d0..23968f6 100644 --- a/serial_posix.c +++ b/serial_posix.c @@ -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"); diff --git a/serial_win32.c b/serial_win32.c index 7357d91..3ddc5ff 100644 --- a/serial_win32.c +++ b/serial_win32.c @@ -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");