Add support to configure mark/space parity for uart tty.
This is blocked by https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237576 To work parity errors must work correctly in UART.
Differential D20073
Add support for mark/space parity in TTY for UART Authored by smaryus_gmail.com on Apr 26 2019, 8:58 AM. Tags None Referenced Files
Subscribers None
Details
Add support to configure mark/space parity for uart tty. This is blocked by https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237576 To work parity errors must work correctly in UART.
struct termios tio; tcgetattr(fd, &tio); cfmakeraw(&tio); tio.c_cflag |= CMSPAR; tio.c_cflag |= PARODD; // select space parity so that only address byte causes error tio.c_cflag |= PARENB; // enable parity generation tio.c_cflag |= CSIZE | CS8; tio.c_iflag |= INPCK; // enable parity checking tio.c_iflag |= PARMRK; // enable in-band marking tio.c_iflag &= ~IGNPAR; // make sure input parity errors are not ignored tcsetattr(fd, TCSANOW, &tio);
Diff Detail
|