File 0001-Fix-initialization-of-serial-port.patch of Package lpcflash
From 48bcdb429650194b4aa0b94d2c30096fa8a3a608 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Sun, 13 Oct 2019 20:45:02 +0200
Subject: [PATCH] Fix initialization of serial port
---
serial.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/serial.c b/serial.c
index a8ea925..3a51218 100644
--- a/serial.c
+++ b/serial.c
@@ -273,36 +273,36 @@ int serial_open(char *device, int baudrate)
* c_lflag
*/
- CLR(ttyio.c_cflag,ISIG);
+ CLR(ttyio.c_lflag,ISIG);
// When any of the characters INTR, QUIT, SUSP, or DSUSP are
// received, generate the corresponding signal.
- SET(ttyio.c_cflag,ICANON);
+ CLR(ttyio.c_lflag,ICANON);
// Enable canonical mode (described below).
- CLR(ttyio.c_cflag,ECHO);
+ CLR(ttyio.c_lflag,ECHO);
// Echo input characters.
- CLR(ttyio.c_cflag,ECHOE);
+ CLR(ttyio.c_lflag,ECHOE);
// If ICANON is also set, the ERASE character erases the preceding
// input character, and WERASE erases the preceding word.
- CLR(ttyio.c_cflag,ECHOK);
+ CLR(ttyio.c_lflag,ECHOK);
// If ICANON is also set, the KILL character erases the current line.
- CLR(ttyio.c_cflag,ECHONL);
+ CLR(ttyio.c_lflag,ECHONL);
// If ICANON is also set, echo the NL character even if ECHO is not
// set.
- CLR(ttyio.c_cflag,NOFLSH);
+ CLR(ttyio.c_lflag,NOFLSH);
// Disable flushing the input and output queues when generating
// signals for the INT, QUIT, and SUSP characters.
- CLR(ttyio.c_cflag,TOSTOP);
+ CLR(ttyio.c_lflag,TOSTOP);
// Send the SIGTTOU signal to the process group of a background
// process which tries to write to its controlling terminal.
- CLR(ttyio.c_cflag,IEXTEN);
+ CLR(ttyio.c_lflag,IEXTEN);
// Enable implementation-defined input processing. This flag, as well
// as ICANON must be enabled for the special characters EOL2, LNEXT,
// REPRINT, WERASE to be interpreted, and for the IUCLC flag to be
--
2.23.0