uart: fix xonxoff value in mraa_uart_settings()
the value of xonxoff(IXON|IXOFF) resides in the c_iflag field in struct termios, not c_cflag. Signed-off-by: Benxi Liu <bxliu@linux.alibaba.com>
This commit is contained in:
committed by
Thomas Ingleby
parent
c1eeb8ab87
commit
3b2f80b6e2
@@ -419,7 +419,7 @@ mraa_uart_settings(int index, const char **devpath, const char **name, int* baud
|
||||
}
|
||||
|
||||
if (xonxoff != NULL) {
|
||||
*xonxoff = term.c_cflag & (IXON|IXOFF);
|
||||
*xonxoff = term.c_iflag & (IXON|IXOFF);
|
||||
}
|
||||
|
||||
close(fd);
|
||||
|
||||
Reference in New Issue
Block a user