The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/chips/lk201.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* 
    2  * Mach Operating System
    3  * Copyright (c) 1991,1990 Carnegie Mellon University
    4  * All Rights Reserved.
    5  * 
    6  * Permission to use, copy, modify and distribute this software and its
    7  * documentation is hereby granted, provided that both the copyright
    8  * notice and this permission notice appear in all copies of the
    9  * software, derivative works or modified versions, and any portions
   10  * thereof, and that both notices appear in supporting documentation.
   11  * 
   12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15  * 
   16  * Carnegie Mellon requests users of this software to return to
   17  * 
   18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19  *  School of Computer Science
   20  *  Carnegie Mellon University
   21  *  Pittsburgh PA 15213-3890
   22  * 
   23  * any improvements or extensions that they make and grant Carnegie Mellon
   24  * the rights to redistribute these changes.
   25  */
   26 /*
   27  * HISTORY
   28  * $Log:        lk201.h,v $
   29  * Revision 2.8  92/02/19  16:45:54  elf
   30  *      Added some defs for lk401 keyboard.
   31  *      [92/01/31            af]
   32  * 
   33  * Revision 2.7  91/06/19  11:53:50  rvb
   34  *      File moved here from mips/PMAX since it tries to be generic;
   35  *      it is used on the PMAX and the Vax3100.
   36  *      [91/06/04            rvb]
   37  * 
   38  * Revision 2.6  91/05/14  17:23:50  mrt
   39  *      Correcting copyright
   40  * 
   41  * Revision 2.5  91/03/16  14:54:12  rpd
   42  *      Fixed ioctl definitions for ANSI C.
   43  *      [91/02/20            rpd]
   44  * 
   45  * Revision 2.4  91/02/05  17:42:19  mrt
   46  *      Added author notices
   47  *      [91/02/04  11:14:42  mrt]
   48  * 
   49  *      Changed to use new Mach copyright
   50  *      [91/02/02  12:13:17  mrt]
   51  * 
   52  * Revision 2.3  90/12/05  23:32:09  af
   53  *      Cleanups.
   54  *      [90/12/03  23:26:51  af]
   55  * 
   56  * Revision 2.1.1.1  90/11/01  03:42:54  af
   57  *      Created, from DEC specs:
   58  *      "VCB02 Video Subsystem Technical Manual"
   59  *      DEC Educational Services, AZ-GLGAB-MN Feb 1986
   60  *      [90/10/10            af]
   61  */
   62 /*
   63  *      File: lk201.h
   64  *      Author: Alessandro Forin, Carnegie Mellon University
   65  *      Date:   9/90
   66  *
   67  *      Definitions for the LK201 Keyboard Driver
   68  */
   69 
   70 /*
   71  *      KeyCodes generated by the LK201 board
   72  *      (labels as in the lk201-AA USA model)
   73  */
   74 
   75 #define LK_MINCODE      0x56
   76                                                         /* Function keys */
   77 #define LK_F1           0x56            /* div 10 */
   78 #define LK_F2           0x57
   79 #define LK_F3           0x58
   80 #define LK_F4           0x59
   81 #define LK_F5           0x5a
   82 #define LK_F6           0x64            /* div 11 */
   83 #define LK_F7           0x65
   84 #define LK_F8           0x66
   85 #define LK_F9           0x67
   86 #define LK_F10          0x68
   87 #define LK_F11          0x71            /* div 12 */
   88 #define LK_ESC          LK_F11
   89 #define LK_F12          0x72
   90 #define LK_BS           LK_F12
   91 #define LK_F13          0x73
   92 #define LK_LF           LK_F13
   93 #define LK_F14          0x74
   94 #define LK_HELP         0x7c            /* div 13 */
   95 #define LK_DO           0x7d
   96 #define LK_F17          0x80            /* div 14 */
   97 #define LK_F18          0x81
   98 #define LK_F19          0x82
   99 #define LK_F20          0x83
  100                                                         /* Editing keys */
  101 #define LK_FIND         0x8a            /* div 9 */
  102 #define LK_INSERT       0x8b
  103 #define LK_REMOVE       0x8c
  104 #define LK_SELECT       0x8d
  105 #define LK_PREV_SCREEN  0x8e
  106 #define LK_NEXT_SCREEN  0x8f
  107                                                         /* Numeric keypad */
  108 #define LK_KP_0         0x92            /* div 2 */
  109 #define LK_KP_DOT       0x94
  110 #define LK_KP_ENTER     0x95
  111 #define LK_KP_1         0x96
  112 #define LK_KP_2         0x97
  113 #define LK_KP_3         0x98
  114 #define LK_KP_4         0x99
  115 #define LK_KP_5         0x9a
  116 #define LK_KP_6         0x9b
  117 #define LK_KP_COMMA     0x9c
  118 #define LK_KP_7         0x9d
  119 #define LK_KP_8         0x9e
  120 #define LK_KP_9         0x9f
  121 #define LK_KP_MINUS     0xa0
  122 #define LK_KP_PF1       0xa1
  123 #define LK_KP_PF2       0xa2
  124 #define LK_KP_PF3       0xa3
  125 #define LK_KP_PF4       0xa4
  126                                                         /* Cursor keys */
  127 #define LK_LEFT         0xa7            /* div 7 */
  128 #define LK_RIGHT        0xa8
  129 #define LK_DOWN         0xa9            /* div 8 */
  130 #define LK_UP           0xaa
  131                                                         /* Shift & Co. */
  132 #define LK_R_SHIFT      0xab            /* lk401 */
  133 #define LK_L_ALT        0xac            /* lk401 */
  134 #define LK_R_COMPOSE    0xad            /* lk401 */
  135 #define LK_SHIFT        0xae            /* div 6 */
  136 #define LK_CNTRL        0xaf
  137 #define LK_LOCK         0xb0            /* div 5 */
  138 #define LK_ALT          0xb1
  139 #define LK_R_ALT        0xb2            /* lk401 */
  140                                                         /* Special codes */
  141 #define LK_ALLUP        0xb3
  142 #define LK_REPEAT       0xb4
  143 #define LK_OUTPUT_ERR   0xb5
  144 #define LK_INPUT_ERR    0xb6
  145 #define LK_KDBLOCK_ACK  0xb7
  146 #define LK_TESTMODE_ACK 0xb8
  147 #define LK_PFX_KEYDOWN  0xb9
  148 #define LK_MODECHG_ACK  0xba
  149                                                         /* Delete & Co. */
  150 #define LK_DEL          0xbc            /* div 3 */
  151 #define LK_RETURN       0xbd            /* div 4 */
  152 #define LK_TAB          0xbe
  153                                                         /* Graphic keys */
  154 
  155 #define LK_TILDE        0xbf            /* div 2 */
  156 #define LK_1            0xc0
  157 #define LK_Q            0xc1
  158 #define LK_A            0xc2
  159 #define LK_Z            0xc3
  160 #define LK_2            0xc5
  161 #define LK_W            0xc6
  162 #define LK_S            0xc7
  163 #define LK_X            0xc8
  164 #define LK_LESSGRT      0xc9
  165 #define LK_3            0xcb
  166 #define LK_E            0xcc
  167 #define LK_D            0xcd
  168 #define LK_C            0xce
  169 #define LK_4            0xd0
  170 #define LK_R            0xd1
  171 #define LK_F            0xd2
  172 #define LK_V            0xd3
  173 #define LK_SP           0xd4
  174 #define LK_5            0xd6
  175 #define LK_T            0xd7
  176 #define LK_G            0xd8
  177 #define LK_B            0xd9
  178 #define LK_6            0xdb
  179 #define LK_Y            0xdc
  180 #define LK_H            0xdd
  181 #define LK_N            0xde
  182 #define LK_7            0xe0            /* div 1 */
  183 #define LK_U            0xe1
  184 #define LK_J            0xe2
  185 #define LK_M            0xe3
  186 #define LK_8            0xe5
  187 #define LK_I            0xe6
  188 #define LK_K            0xe7
  189 #define LK_DQUOTE       0xe8
  190 #define LK_9            0xea
  191 #define LK_O            0xeb
  192 #define LK_L            0xec
  193 #define LK_DOT          0xed
  194 #define LK_0            0xef
  195 #define LK_P            0xf0
  196 #define LK_COLON        0xf2
  197 #define LK_QMARK        0xf3
  198 #define LK_PLUS         0xf5
  199 #define LK_RBRACKET     0xf6
  200 #define LK_VBAR         0xf7
  201 #define LK_MINUS        0xf9
  202 #define LK_LBRACKET     0xfa
  203 #define LK_COMMA        0xfb
  204 
  205 
  206 /*
  207  *      Commands to the keyboard processor
  208  */
  209 
  210 #define LK_PARAM                0x80    /* start/end parameter list */
  211 
  212 #define LK_CMD_RESUME           0x8b
  213 #define LK_CMD_INHIBIT          0xb9
  214 #define LK_CMD_LEDS_ON          0x13    /* 1 param: led bitmask */
  215 #define LK_CMD_LEDS_OFF         0x11    /* 1 param: led bitmask */
  216 #define LK_CMD_DIS_KEYCLK       0x99
  217 #define LK_CMD_ENB_KEYCLK       0x1b    /* 1 param: volume */
  218 #define LK_CMD_DIS_CTLCLK       0xb9
  219 #define LK_CMD_ENB_CTLCLK       0xbb
  220 #define LK_CMD_SOUND_CLK        0x9f
  221 #define LK_CMD_DIS_BELL         0xa1
  222 #define LK_CMD_ENB_BELL         0x23    /* 1 param: volume */
  223 #define LK_CMD_BELL             0xa7
  224 #define LK_CMD_TMP_NORPT        0xc1
  225 #define LK_CMD_ENB_RPT          0xe3
  226 #define LK_CMD_DIS_RPT          0xe1
  227 #define LK_CMD_RPT_TO_DOWN      0xd9
  228 #define LK_CMD_REQ_ID           0xab
  229 #define LK_CMD_POWER_UP         0xfd
  230 #define LK_CMD_TEST_MODE        0xcb
  231 #define LK_CMD_SET_DEFAULTS     0xd3
  232 
  233 /* there are 4 leds, represent them in the low 4 bits of a byte */
  234 #define LK_PARAM_LED_MASK(ledbmap)      (LK_PARAM|(ledbmap))
  235 
  236 /* max volume is 0, lowest is 0x7 */
  237 #define LK_PARAM_VOLUME(v)              (LK_PARAM|((v)&0x7))
  238 
  239 /* mode set command(s) details */
  240 #define LK_MODE_DOWN            0x0
  241 #define LK_MODE_RPT_DOWN        0x2
  242 #define LK_MODE_DOWN_UP         0x6
  243 #define LK_CMD_MODE(m,div)      (LK_PARAM|(div<<3)|m)
  244 
  245 
  246 /*
  247  *      Keyboard set_status codes and arguments
  248  */
  249 
  250 /* Send a command packet to the lk201 */
  251 typedef struct {
  252         unsigned char   len;                            /* how many params */
  253         unsigned char   command;                        /* cmd to lk201 */
  254         unsigned char   params[2];                      /* extra params */
  255 } lk201_cmd_t;
  256 #define LK201_SEND_CMD          _IOW('q', 5, lk201_cmd_t)/* keybd. per. cmd */
  257 
  258 /* Control rotation of lk201 leds */
  259 #define LK201_LED_PATTERN       _IOW('q', 119, int)     /* cylon, ... */
  260 #       define LED_COUNT        1                       /* led counter */
  261 #       define LED_ROTATE       2                       /* led rotate */
  262 #       define LED_CYLON        3                       /* led cylon mode */
  263 
  264 #define LK201_LED_INTERVAL      _IOW('q', 120, int)     /* refresh interval */
  265 #       define LED_OFF          0                       /* no led movement */
  266 
  267 /* Map the caps-lock key to act as the control key (skinny-fingers) */
  268 #define LK201_mapLOCKtoCNTRL    _IOW('q', 121, int)     /* 1 or 0 */
  269 
  270 /* Remap a lk201 keycode to a different (ASCII) translation */
  271 typedef struct {
  272         unsigned char in_keyval;
  273         unsigned char shifted;
  274         unsigned char out_keyval;
  275         unsigned char meta;
  276 } KeyMap;
  277 #define LK201_REMAP_KEY          _IOW('q', 122, KeyMap) /* 1 or 0 */

Cache object: 25d5efaa19574240d47c31d203f0e6a1


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.