Skip to content

Commit

Permalink
Bugfix: termios cflag
Browse files Browse the repository at this point in the history
  • Loading branch information
jaka committed Feb 21, 2021
1 parent 611bcef commit f2e6f91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions include/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ int owReset(int fd)
ut_errno = 1;
return -1;
}
term.c_cflag &= ~CSIZE | CS8;
term.c_cflag &= ~CSIZE;
term.c_cflag |= CS8;
cfsetispeed(&term, B9600);
cfsetospeed(&term, B9600);
tcsetattr(fd, TCSANOW, &term);
Expand Down Expand Up @@ -75,7 +76,8 @@ int owReset(int fd)
rv = -1; /* Timed out or interrupt. */
}

term.c_cflag &= ~CSIZE | CS6;
term.c_cflag &= ~CSIZE;
term.c_cflag |= CS6;
cfsetispeed(&term, B115200);
cfsetospeed(&term, B115200);

Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int main(int argc, char **argv)
}

if (verbose) {
printf("USB Thermometer CLI v1.061 Copyright 2020 usbtemp.com Licensed under MIT licence.\n");
printf("USB Thermometer CLI v1.062 Copyright 2021 usbtemp.com Licensed under MIT licence.\n");
}

if (action == HELP) {
Expand Down

0 comments on commit f2e6f91

Please sign in to comment.