tarm / serial

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

Conversion of CR to NewLine is not turned off properly #51

Open heri16 opened 7 years ago

heri16 commented 7 years ago

Inside serial.OpenPort, turning off ICRNL does not take effect unless port is closed and reopened again.

// Turn off break interrupts, CR->NL, Parity checks, strip, and IXON
    st.c_iflag &= ^C.tcflag_t(C.BRKINT | C.ICRNL | C.INPCK | C.ISTRIP | C.IXOFF | C.IXON | C.PARMRK)