diff --git a/lppserial.pri b/lppserial.pri new file mode 100644 --- /dev/null +++ b/lppserial.pri @@ -0,0 +1,12 @@ + + +HEADERS += \ + $${PWD}/src/RS232.h + +win32:SOURCES += $${PWD}/src/RS232_win.c + +unix:SOURCES += $${PWD}/src/RS232_unix.c + +debug:DEFINES+=RS232_debug + + diff --git a/src/RS232_win.c b/src/RS232_win.c --- a/src/RS232_win.c +++ b/src/RS232_win.c @@ -206,11 +206,11 @@ int rs232setup(rs232port_t fd, int ChSiz dcbSerialParams.Parity=privatedecodeparity(Parity); SetCommState((HANDLE)fd, &dcbSerialParams); COMMTIMEOUTS timeouts={0}; - timeouts.ReadIntervalTimeout=100; - timeouts.ReadTotalTimeoutConstant=100; + timeouts.ReadIntervalTimeout=1; + timeouts.ReadTotalTimeoutConstant=10; timeouts.ReadTotalTimeoutMultiplier=1; - timeouts.WriteTotalTimeoutConstant=100; - timeouts.WriteTotalTimeoutMultiplier=10; + timeouts.WriteTotalTimeoutConstant=1; + timeouts.WriteTotalTimeoutMultiplier=1; SetCommTimeouts((HANDLE)fd, &timeouts); return rs232noerr; }