Commit ef3b0657dd7635db29536cca97e94806e03db52f

Con Kolivas 2013-05-10T18:24:04

Fix the problem of seting up termio of ttyUSB0 for icarus. the CSIZE is the mask of CS2/4/8 From: navyxliu <navy.xliu@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/fpgautils.c b/fpgautils.c
index c15b3d1..ecde9a8 100644
--- a/fpgautils.c
+++ b/fpgautils.c
@@ -409,10 +409,10 @@ int serial_open(const char *devpath, unsigned long baud, signed short timeout, b
 		applog(LOG_WARNING, "Unrecognized baud rate: %lu", baud);
 	}
 
+	my_termios.c_cflag &= ~(CSIZE | PARENB);
 	my_termios.c_cflag |= CS8;
 	my_termios.c_cflag |= CREAD;
 	my_termios.c_cflag |= CLOCAL;
-	my_termios.c_cflag &= ~(CSIZE | PARENB);
 
 	my_termios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK |
 				ISTRIP | INLCR | IGNCR | ICRNL | IXON);