]> sigrok.org Git - libsigrok.git/commitdiff
serial: more serial processing flags to turn off
authorBert Vermeulen <redacted>
Wed, 23 Jan 2013 01:32:58 +0000 (02:32 +0100)
committerBert Vermeulen <redacted>
Wed, 23 Jan 2013 01:32:58 +0000 (02:32 +0100)
hardware/common/serial.c

index 4ac342f06d9b6e63273a34ecdfa4aa4bf3279bac..e32c0f1e2656571f6d564e6bebd76d89f5c13aad 100644 (file)
@@ -589,8 +589,9 @@ SR_PRIV int serial_set_params(struct sr_serial_dev_inst *serial, int baudrate,
                return SR_ERR;
        }
 
-       /* Do not translate carriage return to newline on input. */
-       term.c_iflag &= ~(ICRNL);
+       /* Turn off all serial port cooking. */
+       term.c_iflag &= ~(ISTRIP | INLCR | ICRNL);
+       term.c_oflag &= ~(ONLCR | OCRNL | ONOCR | OFILL );
 
        /* Disable canonical mode, and don't echo input characters. */
        term.c_lflag &= ~(ICANON | ECHO);