Private
Public Access
2
0

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:
Benxi Liu
2019-09-06 17:56:12 +08:00
committed by Thomas Ingleby
parent c1eeb8ab87
commit 3b2f80b6e2

View File

@@ -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);