Browse Source

Fix the problem of seting up termio of ttyUSB0 for icarus. the CSIZE is the mask of CS2/4/8

navyxliu 12 years ago
parent
commit
31a47fce24
1 changed files with 1 additions and 1 deletions
  1. 1 1
      fpgautils.c

+ 1 - 1
fpgautils.c

@@ -192,10 +192,10 @@ serial_open(const char*devpath, unsigned long baud, signed short timeout, bool p
 		applog(LOG_WARNING, "Unrecognized baud rate: %lu", baud);
 		applog(LOG_WARNING, "Unrecognized baud rate: %lu", baud);
 	}
 	}
 
 
+	my_termios.c_cflag &= ~(CSIZE | PARENB);
 	my_termios.c_cflag |= CS8;
 	my_termios.c_cflag |= CS8;
 	my_termios.c_cflag |= CREAD;
 	my_termios.c_cflag |= CREAD;
 	my_termios.c_cflag |= CLOCAL;
 	my_termios.c_cflag |= CLOCAL;
-	my_termios.c_cflag &= ~(CSIZE | PARENB);
 
 
 	my_termios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK |
 	my_termios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK |
 				ISTRIP | INLCR | IGNCR | ICRNL | IXON);
 				ISTRIP | INLCR | IGNCR | ICRNL | IXON);