uart.c: fix to UART even parity
Signed-off-by: David McCloskey <davmcclo@gmail.com> Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
committed by
Brendan Le Foll
parent
6aaf48940e
commit
c89b04eb19
@@ -352,8 +352,8 @@ mraa_uart_set_mode(mraa_uart_context dev, int bytesize, mraa_uart_parity_t parit
|
||||
termio.c_cflag &= ~(PARENB | PARODD);
|
||||
break;
|
||||
case MRAA_UART_PARITY_EVEN:
|
||||
termio.c_cflag |= PARENB;
|
||||
termio.c_cflag &= ~PARODD;
|
||||
termio.c_cflag |= PARODD;
|
||||
break;
|
||||
case MRAA_UART_PARITY_ODD:
|
||||
termio.c_cflag |= PARENB | PARODD;
|
||||
|
||||
Reference in New Issue
Block a user