Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/dreamcast/dev/maple Recognize the US keyboard.



details:   https://anonhg.NetBSD.org/src/rev/cd569c2ab223
branches:  trunk
changeset: 503082:cd569c2ab223
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Jan 31 00:08:35 2001 +0000

description:
Recognize the US keyboard.

diffstat:

 sys/arch/dreamcast/dev/maple/mkbd.c |  22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r d1cc1a409fa8 -r cd569c2ab223 sys/arch/dreamcast/dev/maple/mkbd.c
--- a/sys/arch/dreamcast/dev/maple/mkbd.c       Tue Jan 30 23:32:34 2001 +0000
+++ b/sys/arch/dreamcast/dev/maple/mkbd.c       Wed Jan 31 00:08:35 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkbd.c,v 1.2 2001/01/21 22:44:40 marcus Exp $  */
+/*     $NetBSD: mkbd.c,v 1.3 2001/01/31 00:08:35 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2001 Marcus Comstedt
@@ -118,16 +118,26 @@
        struct wskbddev_attach_args a;
        static int mkbd_console_initted = 0;
 #endif
+       u_int32_t kbdtype;
 
        sc->sc_parent = parent;
        sc->sc_port = ma->ma_port;
        sc->sc_subunit = ma->ma_subunit;
 
-       switch(maple_get_function_data(ma->ma_devinfo,
-                                      MAPLE_FUNC_KEYBOARD)>>24) {
-         case 1: printf(" (Japanese keyboard)"); break;
-         case 3: printf(" (European keyboard)"); break;           
-         default: printf(" (Unknown keyboard)");
+       kbdtype = maple_get_function_data(ma->ma_devinfo,
+           MAPLE_FUNC_KEYBOARD) >> 24;
+       switch(kbdtype) {
+       case 1:
+               printf(" (Japanese keyboard)");
+               break;
+       case 2:
+               printf(" (US keyboard)");
+               break;
+       case 3:
+               printf(" (European keyboard)");
+               break;
+       default:
+               printf(" (Unknown keyboard %d)", kbdtype);
        }
        printf("\n");
 



Home | Main Index | Thread Index | Old Index