From 3b2f80b6e29656b4a17d5da6dfd2b10e67863314 Mon Sep 17 00:00:00 2001 From: Benxi Liu Date: Fri, 6 Sep 2019 17:56:12 +0800 Subject: [PATCH] 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 --- src/uart/uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uart/uart.c b/src/uart/uart.c index cbde04c..f1a76d2 100644 --- a/src/uart/uart.c +++ b/src/uart/uart.c @@ -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);