changeset 2284:e869b71cc3ed

* cdl/termios.cdl: src/common/termiostty.c: added Termios TTY channel #3 * cdl/tty.cdl: src/common/tty.c: added TTY mode channel #3
author asl
date Sun, 03 Sep 2006 17:32:31 +0000
parents 61a94be4cc1b
children 0bc33be1dc50
files packages/io/serial/current/ChangeLog packages/io/serial/current/cdl/termios.cdl packages/io/serial/current/cdl/tty.cdl packages/io/serial/current/src/common/termiostty.c packages/io/serial/current/src/common/tty.c
diffstat 5 files changed, 68 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/packages/io/serial/current/ChangeLog
+++ b/packages/io/serial/current/ChangeLog
@@ -1,3 +1,12 @@
+2006-08-31  Ilija Koco  <ilijak@siva.com.mk>
+	    Andrew Lunn <andrew.lunn@ascom.ch>
+	
+	* cdl/termios.cdl: 
+	  src/common/termiostty.c: added Termios TTY channel #3
+	* cdl/tty.cdl: 
+	  src/common/tty.c: added TTY mode channel #3
+
+
 2006-08-22  Peter Csordas <csordas@mit.bme.hu>
 
         * include/serialio.h (cyg_serial_baud_rate_t): Adding baud rate
--- a/packages/io/serial/current/cdl/termios.cdl
+++ b/packages/io/serial/current/cdl/termios.cdl
@@ -116,6 +116,25 @@ cdl_component CYGPKG_IO_SERIAL_TERMIOS_T
     }
 }
 
+cdl_component CYGPKG_IO_SERIAL_TERMIOS_TERMIOS3 {
+    display       "Termios TTY channel #3"
+    flavor        bool
+    default_value 0
+    implements    CYGINT_IO_SERIAL_TERMIOS_TERMIOS_TTY
+    description   "
+        This option causes '/dev/termios3' to be included in the standard 
+        drivers."
+
+    cdl_option CYGDAT_IO_SERIAL_TERMIOS_TERMIOS3_DEV {
+        display       "Termios TTY channel #3 device"
+        flavor        data
+        default_value {"\"/dev/ser3\""}
+        description   "
+            This option selects the physical device to use for 
+            '/dev/termios3'."
+    }
+}
+
 cdl_option CYGSEM_IO_SERIAL_TERMIOS_USE_SIGNALS {
     display         "Support signals"
     flavor          bool
--- a/packages/io/serial/current/cdl/tty.cdl
+++ b/packages/io/serial/current/cdl/tty.cdl
@@ -128,3 +128,21 @@ cdl_component CYGPKG_IO_SERIAL_TTY_TTY2 
             '/dev/tty2'."
     }
 }
+
+cdl_component CYGPKG_IO_SERIAL_TTY_TTY3 {
+    display       "TTY mode channel #3"
+    flavor        bool
+    default_value 0
+    description   "
+        This option causes '/dev/tty3' to be included in the standard 
+        drivers."
+
+    cdl_option CYGDAT_IO_SERIAL_TTY_TTY3_DEV {
+        display       "TTY mode channel #3 device"
+        flavor        data
+        default_value {"\"/dev/ser3\""}
+        description   "
+            This option selects the physical device to use for 
+            '/dev/tty3'."
+    }
+}
--- a/packages/io/serial/current/src/common/termiostty.c
+++ b/packages/io/serial/current/src/common/termiostty.c
@@ -158,6 +158,17 @@ DEVTAB_ENTRY(termios_io2,
              &termios_private_info2);
 #endif
 
+#ifdef CYGPKG_IO_SERIAL_TERMIOS_TERMIOS3
+static struct termios_private_info termios_private_info3;
+DEVTAB_ENTRY(termios_io3, 
+             "/dev/termios3", 
+             CYGDAT_IO_SERIAL_TERMIOS_TERMIOS3_DEV,
+             &termios_devio, 
+             termios_init, 
+             termios_lookup,
+             &termios_private_info3);
+#endif
+
 static const cc_t c_cc_init[ NCCS ] = { 
     0x04,     /* EOF == ^D */
     0,        /* EOL */
--- a/packages/io/serial/current/src/common/tty.c
+++ b/packages/io/serial/current/src/common/tty.c
@@ -127,6 +127,17 @@ DEVTAB_ENTRY(tty_io2,
              &tty_private_info2);
 #endif
 
+#ifdef CYGPKG_IO_SERIAL_TTY_TTY3
+static struct tty_private_info tty_private_info3;
+DEVTAB_ENTRY(tty_io3, 
+             "/dev/tty3", 
+             CYGDAT_IO_SERIAL_TTY_TTY3_DEV,
+             &tty_devio, 
+             tty_init, 
+             tty_lookup,      // Execute this when device is being looked up
+             &tty_private_info3);
+#endif
+
 static bool 
 tty_init(struct cyg_devtab_entry *tab)
 {