tarm / serial

BSD 3-Clause "New" or "Revised" License
1.6k stars 453 forks source link

serial_posix: fix even parity #57

Closed akavel closed 6 years ago

akavel commented 7 years ago

Previously, when even parity was requested, PARODD was erroneously retained, and thus could actually result in odd parity being set (retained from what was set by tcgetattr)

tarm commented 7 years ago

Thanks for noticing this @akavel !

Actually can you move that clearing up to line 92 so that the ParityNone case works as well?

akavel commented 7 years ago

hm; I thought ParityNone should be working already, because PARENB is cleared on l.92? Isn't PARODD ignored if PARENB==0?