This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Incomplete baud rate mapping in termiostty.c


Hi Folks

Here is Rainers patch plus my patch for the init flag.

     Andrew
Index: io/serial/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/serial/current/ChangeLog,v
retrieving revision 1.71
diff -u -r1.71 ChangeLog
--- io/serial/current/ChangeLog	3 Sep 2006 17:32:31 -0000	1.71
+++ io/serial/current/ChangeLog	30 Jan 2008 18:38:41 -0000
@@ -1,3 +1,14 @@
+2008-01-30  Andrew Lunn  <andrew.lunn@ascom.ch>
+
+	* src/common/termiostty.c (termios_lookup): Add missing set of
+	init flag. Pointed out by Rainer Arndt.
+
+	
+2008-01-30  Rainer Arndt <Arndt-ADT@kieback-peter.de>
+
+	* src/common/termiostty.c (ecosbaud2posixbaud[]): Add missing
+	B1800 entry.
+
 2006-08-31  Ilija Koco  <ilijak@siva.com.mk>
 	    Andrew Lunn <andrew.lunn@ascom.ch>
 	
Index: io/serial/current/src/common/termiostty.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/serial/current/src/common/termiostty.c,v
retrieving revision 1.9
diff -u -r1.9 termiostty.c
--- io/serial/current/src/common/termiostty.c	3 Sep 2006 17:32:31 -0000	1.9
+++ io/serial/current/src/common/termiostty.c	30 Jan 2008 18:38:42 -0000
@@ -190,7 +190,7 @@
 
 // map eCos bitrates to POSIX bitrates.
 static speed_t ecosbaud2posixbaud[] = {
-    0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B2400, B3600,
+    0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400, B3600,
     B4800, B7200, B9600, B14400, B19200, B38400, B57600, B115200, B230400 };
 
 // map POSIX bitrates to eCos bitrates.
@@ -580,6 +580,7 @@
     if ( !priv->init ) {
         cyg_drv_mutex_lock( &priv->lock );
         if ( !priv->init ) {  // retest as we may have been pre-empted
+            priv->init = true;
             priv->dev_handle = chan;
             err = real_termios_init( priv );
         }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]