Add support for space parity

This commit is contained in:
Martin Lund 2022-07-11 14:55:54 +02:00
parent bf972bd2f9
commit 360deb3c72
2 changed files with 10 additions and 2 deletions

View file

@ -625,10 +625,16 @@ void tty_configure(void)
}
else if ( strcmp("mark", option.parity) == 0)
{
tio.c_cflag &= ~PARENB;
tio.c_cflag |= PARENB;
tio.c_cflag |= PARODD;
tio.c_cflag |= CMSPAR;
}
else if ( strcmp("space", option.parity) == 0)
{
tio.c_cflag |= PARENB;
tio.c_cflag &= ~PARODD;
tio.c_cflag |= CMSPAR;
}
else
{
error_printf("Invalid parity");