mtx: add keyboard/vt ioctls
authorAlan Cox <alan@linux.intel.com>
Tue, 30 Dec 2014 19:05:50 +0000 (19:05 +0000)
committerAlan Cox <alan@linux.intel.com>
Tue, 30 Dec 2014 19:05:50 +0000 (19:05 +0000)
Kernel/platform-mtx/config.h
Kernel/platform-mtx/devices.c
Kernel/platform-mtx/devtty.c
Kernel/platform-mtx/devtty.h

index 22956b8..c6170d6 100644 (file)
@@ -14,6 +14,7 @@
 #define CONFIG_VT
 /* Multiple VT support */
 #define CONFIG_VT_MULTI
+#define MAX_VT 2
 /* We need a 6x8 font to upload to the vdp */
 #define CONFIG_FONT6X8
 /* Fixed banking */
index 48ec6d8..edddf36 100644 (file)
@@ -2,6 +2,7 @@
 #include <version.h>
 #include <kdata.h>
 #include <tty.h>
+#include <vt.h>
 #include <devfd.h>
 #include <devsil.h>
 #include <devsys.h>
@@ -17,7 +18,7 @@ struct devsw dev_tab[] =  /* The device driver switch table */
   /* 1: /dev/hd                Hard disc block devices (hdx - not supported yet) */
   {  no_open,      no_close,    no_rdwr,  no_rdwr,   no_ioctl   },
   /* 2: /dev/tty       TTY devices */
-  {  tty_open,     mtxtty_close,tty_read, tty_write,  tty_ioctl },
+  {  tty_open,     mtxtty_close,tty_read, tty_write,  vt_ioctl },
   /* 3: /dev/lpr       Printer devices */
   {  lpr_open,     lpr_close,   no_rdwr,  lpr_write,  no_ioctl  },
   /* 4: /dev/mem etc   System devices (one offs) */
index 97910b8..1f4522d 100644 (file)
@@ -168,7 +168,7 @@ int mtxtty_close(uint8_t minor)
        return err;
 }
 
-static uint16_t keymap[8];
+uint16_t keymap[8];
 static uint16_t keyin[8];
 static uint8_t keybyte, keybit;
 static uint8_t newkey;
index 0ddb268..0812df9 100644 (file)
@@ -9,4 +9,8 @@ extern signed char vt_twidth[2];
 extern signed char vt_tright[2];
 extern uint8_t curtty;
 
+#define KEY_ROWS       8
+#define KEY_COLS       16
+extern uint16_t keymap[8];
+
 #endif