]> sigrok.org Git - libsigrok.git/commitdiff
sr: always turn off ICRNL on serial ports
authorBert Vermeulen <redacted>
Sat, 22 Sep 2012 21:50:51 +0000 (23:50 +0200)
committerBert Vermeulen <redacted>
Tue, 25 Sep 2012 17:53:05 +0000 (19:53 +0200)
It does rather screw with protocols that use CR.

hardware/common/serial.c

index 0be403af9b87e3a456bd94647382d3a36c1d6dc0..ad88958a0d0feb5c6601651687acdb1dd593c4cd 100644 (file)
@@ -317,6 +317,7 @@ SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity,
        }
 
        /* Some default parameters */
+       term.c_iflag &= ~(ICRNL);
        term.c_lflag &= ~(ICANON | ECHO);
 
        if (tcsetattr(fd, TCSADRAIN, &term) < 0)