Commit 0fdf31dc272c16ea03b5209cf0020c1c46e11372

Kano 2012-03-04T14:05:39

icarus.c set the windows TODO timeout

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/icarus.c b/icarus.c
index 1d59657..b50aaae 100644
--- a/icarus.c
+++ b/icarus.c
@@ -100,7 +100,10 @@ static int icarus_open(const char *devpath)
 				    NULL, OPEN_EXISTING, 0, NULL);
 	if (unlikely(hSerial == INVALID_HANDLE_VALUE))
 		return -1;
-	/* TODO: Needs setup read block time. just like VTIME = 10 */
+
+	COMMTIMEOUTS cto = {1000, 0, 1000, 0, 1000};
+	SetCommTimeouts(hSerial, &cto);
+
 	return _open_osfhandle((LONG)hSerial, 0);
 #endif
 }