Skip to content

newtio settings overwrite each other #2

@JanGunheD

Description

@JanGunheD

newtio.c_iflag = IGNBRK;
newtio.c_iflag &= ~(IXON | IXOFF | IXANY); // No software handshake
newtio.c_iflag = IGNPAR;

newtio.c_iflag = IGNPAR; completely overwrites the changes of the two lines before, I guess this is not intentional?

Also, newtio.c_iflag = IGNBRK; completely overwrites all settings anyway, so newtio.c_iflag &= ~(IXON | IXOFF | IXANY); // No software handshake will have no effect.

It is similar with

newtio.c_cflag = BAUDRATE | CS8 | CLOCAL | CREAD; // | CRTSCTS
newtio.c_cflag &= ~(PARENB | PARODD); // No parity
newtio.c_cflag &= ~CRTSCTS; // No hardware handshake
newtio.c_cflag &= ~CSTOPB; // 1 stopbit

and
newtio.c_lflag = 0;
newtio.c_lflag &= ~(ICANON|ECHO); /* Clear ICANON and ECHO. */

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions