From bc756d7663748ab157fccc2d4209ad4ba01da2ea Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Fri, 12 Aug 2011 22:32:44 +0200 Subject: [PATCH] Use the same baudrate on Unix and Windows. With the support for custom baudrates on all systems, there is no need anymore to use the nearest standard baudrate. Using the exact baudrate should make the communication more reliable on Unix systems. --- src/mares_iconhd.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/mares_iconhd.c b/src/mares_iconhd.c index 55104df..c2c5d49 100644 --- a/src/mares_iconhd.c +++ b/src/mares_iconhd.c @@ -33,12 +33,6 @@ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ ) -#ifdef _WIN32 -#define BAUDRATE 256000 -#else -#define BAUDRATE 230400 -#endif - #define ACK 0xAA #define EOF 0xEA @@ -134,7 +128,7 @@ mares_iconhd_device_open (device_t **out, const char* name) } // Set the serial communication protocol (256000 8N1). - rc = serial_configure (device->port, BAUDRATE, 8, SERIAL_PARITY_NONE, 1, SERIAL_FLOWCONTROL_NONE); + rc = serial_configure (device->port, 256000, 8, SERIAL_PARITY_NONE, 1, SERIAL_FLOWCONTROL_NONE); if (rc == -1) { WARNING ("Failed to set the terminal attributes."); serial_close (device->port);