mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-26 02:47:17 +00:00
Merge pull request #220 from joshmh/master
Parity shouldn't be changing data bits
This commit is contained in:
commit
f859bf8002
1 changed files with 0 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue