Browse Source

Fixed winSerial.c

Max Nuding 12 years ago
parent
commit
fe49f793e1
2 changed files with 4 additions and 4 deletions
  1. 2
    2
      Cube Control/helper/winSerial.c
  2. 2
    2
      Cube Control/makefile

+ 2
- 2
Cube Control/helper/winSerial.c View File

@@ -37,14 +37,14 @@ int serialOpen(char *port) {
37 37
 	DCB dcbSerialParams = {0};
38 38
 	COMMTIMEOUTS timeouts = {0};
39 39
 
40
-	hSerial = CreateFile(port GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
40
+	hSerial = CreateFile(port, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
41 41
 
42 42
 	if (hSerial == INVALID_HANDLE_VALUE) {
43 43
 		return -1;
44 44
 	}
45 45
 	
46 46
 
47
-	dcbSerial.DCBlength = sizeof(dcbSerialParams);
47
+	dcbSerialParams.DCBlength = sizeof(dcbSerialParams);
48 48
 	if (!GetCommState(hSerial, &dcbSerialParams)) {
49 49
 		CloseHandle(hSerial);
50 50
 		hSerial = INVALID_HANDLE_VALUE;

+ 2
- 2
Cube Control/makefile View File

@@ -1,7 +1,7 @@
1 1
 JAVAC = javac
2 2
 CC = gcc
3
-TARGET = unix
4
-#TARGET = win
3
+#TARGET = unix
4
+TARGET = win
5 5
 
6 6
 
7 7
 all: java

Loading…
Cancel
Save