Hi,
I've applied a patch which fixes XON/XOFF control at the termiostty device.
Regards
Rainer
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/serial/current/ChangeLog,v
retrieving revision 1.72
diff -u -r1.72 ChangeLog
--- ChangeLog 30 Jan 2008 18:39:11 -0000 1.72
+++ ChangeLog 20 Aug 2008 08:58:10 -0000
@@ -1,3 +1,9 @@
+2008-08-13 Rainer Arndt <[EMAIL PROTECTED]>
+
+ * src/common/termiostty.c (set_attr) : Fixed bug for XON/XOFF
+ flow control that was wrong in termiostty.
+ set_attr() now looks into c_iflag for IXON/IXOFF flags.
+
2008-01-30 Andrew Lunn <[EMAIL PROTECTED]>
* src/common/termiostty.c (termios_lookup): Add missing set of
Index: src/common/termiostty.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/serial/current/src/common/termiostty.c,v
retrieving revision 1.10
diff -u -r1.10 termiostty.c
--- src/common/termiostty.c 30 Jan 2008 18:39:11 -0000 1.10
+++ src/common/termiostty.c 13 May 2008 09:30:55 -0000
@@ -465,11 +465,11 @@
}
}
- if ( (t->c_cflag & IXOFF) != (ptermios->c_cflag & IXOFF) ) {
+ if ( (t->c_iflag & IXOFF) != (ptermios->c_iflag & IXOFF) ) {
new_dev_conf = dev_conf;
new_dev_conf.flags &=
~(CYGNUM_SERIAL_FLOW_XONXOFF_RX|CYGNUM_SERIAL_FLOW_RTSCTS_RX);
- if ( t->c_cflag & IXOFF )
+ if ( t->c_iflag & IXOFF )
if ( t->c_cflag & CRTSCTS)
new_dev_conf.flags |= CYGNUM_SERIAL_FLOW_RTSCTS_RX;
else
@@ -485,16 +485,18 @@
// It worked, so update dev_conf to reflect the new state
dev_conf.flags = new_dev_conf.flags;
// and termios
- ptermios->c_cflag &= ~(IXOFF|CRTSCTS);
- ptermios->c_cflag |= t->c_cflag & (IXOFF|CRTSCTS);
+ ptermios->c_cflag &= ~(CRTSCTS);
+ ptermios->c_cflag |= t->c_cflag & (CRTSCTS);
+ ptermios->c_iflag &= ~(IXOFF);
+ ptermios->c_iflag |= t->c_iflag & (IXOFF);
}
}
- if ( (t->c_cflag & IXON) != (ptermios->c_cflag & IXON) ) {
+ if ( (t->c_iflag & IXON) != (ptermios->c_iflag & IXON) ) {
new_dev_conf = dev_conf;
new_dev_conf.flags &=
~(CYGNUM_SERIAL_FLOW_XONXOFF_TX|CYGNUM_SERIAL_FLOW_RTSCTS_TX);
- if ( t->c_cflag & IXON )
+ if ( t->c_iflag & IXON )
if ( t->c_cflag & CRTSCTS)
new_dev_conf.flags |= CYGNUM_SERIAL_FLOW_RTSCTS_TX;
else
@@ -510,8 +512,10 @@
// It worked, so update dev_conf to reflect the new state
dev_conf.flags = new_dev_conf.flags;
// and termios
- ptermios->c_cflag &= ~(IXON|CRTSCTS);
- ptermios->c_cflag |= t->c_cflag & (IXON|CRTSCTS);
+ ptermios->c_cflag &= ~(CRTSCTS);
+ ptermios->c_cflag |= t->c_cflag & (CRTSCTS);
+ ptermios->c_iflag &= ~(IXON);
+ ptermios->c_iflag |= t->c_iflag & (IXON);
}
}