Skip to content
Snippets Groups Projects
Commit 2315671e authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Enable ISTRIP mode when fewer than 8 bits are requested.

With this, SyncTERM and SexPOTS on *nix won't actually need to strip
received bytes themselves.  No idea what Windows does though, so
it'll likely still be needed forever.
parent eb38e8c0
No related branches found
No related tags found
No related merge requests found
......@@ -362,15 +362,27 @@ bool comSetBits(COM_HANDLE handle, size_t byteSize, size_t stopBits)
switch(byteSize) {
case 5:
t.c_cflag |= CS5;
#ifdef ISTRIP
t.c_iflag |= ISTRIP;
#endif
break;
case 6:
t.c_cflag |= CS6;
#ifdef ISTRIP
t.c_iflag |= ISTRIP;
#endif
break;
case 7:
t.c_cflag |= CS7;
#ifdef ISTRIP
t.c_iflag |= ISTRIP;
#endif
break;
default:
t.c_cflag |= CS8;
#ifdef ISTRIP
t.c_iflag &= ~(ISTRIP);
#endif
break;
}
if(stopBits == 2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment