Browse Source

Merge branch 'bugfix_icarus_win_hanging' into myfork

Luke Dashjr 13 years ago
parent
commit
3635449543
1 changed files with 2 additions and 1 deletions
  1. 2 1
      driver-icarus.c

+ 2 - 1
driver-icarus.c

@@ -107,7 +107,8 @@ static int icarus_open(const char *devpath)
 	if (unlikely(hSerial == INVALID_HANDLE_VALUE))
 		return -1;
 
-	COMMTIMEOUTS cto = {1000, 0, 1000, 0, 1000};
+	const DWORD ctoms = ICARUS_READ_FAULT_DECISECONDS * 100;
+	COMMTIMEOUTS cto = {ctoms, 0, ctoms, 0, ctoms};
 	SetCommTimeouts(hSerial, &cto);
 
 	return _open_osfhandle((LONG)hSerial, 0);