From: Matthias Heidbrink Date: Thu, 17 Oct 2013 08:57:13 +0000 (+0200) Subject: serial: Added flags CLOCAL (ignore modem status lines) and CREAD (start receiver). X-Git-Tag: libsigrok-0.2.2~28 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a510d55571a970fd90e6aca30771dd34bcc73296;p=libsigrok.git serial: Added flags CLOCAL (ignore modem status lines) and CREAD (start receiver). --- diff --git a/hardware/common/serial.c b/hardware/common/serial.c index 0c64203f..d8a912b2 100644 --- a/hardware/common/serial.c +++ b/hardware/common/serial.c @@ -598,6 +598,9 @@ SR_PRIV int serial_set_params(struct sr_serial_dev_inst *serial, int baudrate, /* Disable canonical mode, and don't echo input characters. */ term.c_lflag &= ~(ICANON | ECHO); + /* Ignore modem status lines; enable receiver */ + term.c_cflag |= (CLOCAL | CREAD); + /* Write the configured settings. */ if (tcsetattr(serial->fd, TCSADRAIN, &term) < 0) { sr_err("tcsetattr() error: %s.", strerror(errno));