Merge pull request #220 from joshmh/master

Parity shouldn't be changing data bits
This commit is contained in:
Chris Williams 2013-10-02 06:38:57 -07:00
commit f859bf8002

View file

@ -234,21 +234,18 @@ void EIO_Open(uv_work_t* req) {
options.c_cflag &= ~PARENB;
options.c_cflag &= ~CSTOPB;
options.c_cflag &= ~CSIZE;
options.c_cflag |= CS8;
break;
case SERIALPORT_PARITY_ODD:
options.c_cflag |= PARENB;
options.c_cflag |= PARODD;
options.c_cflag &= ~CSTOPB;
options.c_cflag &= ~CSIZE;
options.c_cflag |= CS7;
break;
case SERIALPORT_PARITY_EVEN:
options.c_cflag |= PARENB;
options.c_cflag &= ~PARODD;
options.c_cflag &= ~CSTOPB;
options.c_cflag &= ~CSIZE;
options.c_cflag |= CS7;
break;
default:
snprintf(data->errorString, sizeof(data->errorString), "Invalid parity setting %d", data->parity);