From: Alan Cox Date: Tue, 30 Dec 2014 19:06:29 +0000 (+0000) Subject: pcw8256: vt and kbd ioctls X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=fd3e2ef15a8b974a426dc461ff4790d9ccce0031;p=FUZIX.git pcw8256: vt and kbd ioctls --- diff --git a/Kernel/platform-pcw8256/devices.c b/Kernel/platform-pcw8256/devices.c index 50d4a56a..bc8ce587 100644 --- a/Kernel/platform-pcw8256/devices.c +++ b/Kernel/platform-pcw8256/devices.c @@ -5,7 +5,7 @@ #include #include #include -#include +#include struct devsw dev_tab[] = /* The device driver switch table */ { @@ -16,7 +16,7 @@ struct devsw dev_tab[] = /* The device driver switch table */ /* 1: /dev/hd Hard disc block devices (absent) */ { nxio_open, no_close, no_rdwr, no_rdwr, no_ioctl }, /* 2: /dev/tty TTY devices */ - { tty_open, tty_close, tty_read, tty_write, tty_ioctl }, + { tty_open, tty_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) */ diff --git a/Kernel/platform-pcw8256/devtty.c b/Kernel/platform-pcw8256/devtty.c index 81f75f16..616afa21 100644 --- a/Kernel/platform-pcw8256/devtty.c +++ b/Kernel/platform-pcw8256/devtty.c @@ -143,7 +143,7 @@ void tty_init_port(void) /*********************** Keyboard **************************/ -static uint8_t keymap[12]; +uint8_t keymap[12]; static uint8_t *keyin = (uint8_t *)0xFFF0; static uint8_t keybyte, keybit; static uint8_t newkey; diff --git a/Kernel/platform-pcw8256/devtty.h b/Kernel/platform-pcw8256/devtty.h index e3593424..940c0fee 100644 --- a/Kernel/platform-pcw8256/devtty.h +++ b/Kernel/platform-pcw8256/devtty.h @@ -5,4 +5,9 @@ void tty_putc(uint8_t minor, char c); bool tty_writeready(uint8_t minor); void tty_init_port(void); void tty_irq(void); + +#define KEY_ROWS 12 +#define KEY_COLS 8 +extern uint8_t keymap[12]; + #endif