Make sure to always set 8 bits communication with no parity

This commit is contained in:
Pierre Pronchery 2010-05-07 13:07:53 +00:00
parent 2e6ef2b6f2
commit 6169060acb

View File

@ -1936,6 +1936,7 @@ static int _reset_do(int fd, unsigned int baudrate, unsigned int hwflow)
{ {
if(tcgetattr(fd, &term) != 0) if(tcgetattr(fd, &term) != 0)
return 1; return 1;
term.c_cflag &= ~(CSIZE | PARENB);
term.c_cflag |= CS8; term.c_cflag |= CS8;
term.c_cflag |= CREAD; term.c_cflag |= CREAD;
term.c_cflag |= CLOCAL; term.c_cflag |= CLOCAL;