Fix semi-blocking read mode problem with timeouts on Windows
This commit is contained in:
parent
2945c6826c
commit
ddfe80828f
|
@ -2,7 +2,7 @@
|
|||
* SerialPort_Windows.c
|
||||
*
|
||||
* Created on: Feb 25, 2012
|
||||
* Last Updated on: Jul 27, 2018
|
||||
* Last Updated on: Sep 25, 2018
|
||||
* Author: Will Hedgecock
|
||||
*
|
||||
* Copyright (C) 2012-2018 Fazecast, Inc.
|
||||
|
@ -477,7 +477,7 @@ JNIEXPORT jboolean JNICALL Java_com_fazecast_jSerialComm_SerialPort_configTimeou
|
|||
case (com_fazecast_jSerialComm_SerialPort_TIMEOUT_READ_SEMI_BLOCKING | com_fazecast_jSerialComm_SerialPort_TIMEOUT_WRITE_BLOCKING): // Read Semi-blocking/Write Blocking
|
||||
timeouts.ReadIntervalTimeout = MAXDWORD;
|
||||
timeouts.ReadTotalTimeoutMultiplier = MAXDWORD;
|
||||
timeouts.ReadTotalTimeoutConstant = readTimeout;
|
||||
timeouts.ReadTotalTimeoutConstant = readTimeout ? readTimeout : 0x0FFFFFFF;
|
||||
timeouts.WriteTotalTimeoutConstant = writeTimeout;
|
||||
break;
|
||||
case com_fazecast_jSerialComm_SerialPort_TIMEOUT_READ_BLOCKING: // Read Blocking
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue