1 /* 2 * Hewlett Packard Human Interface Loop (HP-HIL) Protocol -- header. 3 * 4 * Copyright (c) 2001 Brian S. Julin 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions, and the following disclaimer, 12 * without modification. 13 * 2. The name of the author may not be used to endorse or promote products 14 * derived from this software without specific prior written permission. 15 * 16 * Alternatively, this software may be distributed under the terms of the 17 * GNU General Public License ("GPL"). 18 * 19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * 29 * References: 30 * HP-HIL Technical Reference Manual. Hewlett Packard Product No. 45918A 31 * 32 * A note of thanks to HP for providing and shipping reference materials 33 * free of charge to help in the development of HIL support for Linux. 34 * 35 */ 36 37 #include <asm/types.h> 38 39 /* Physical constants relevant to raw loop/device timing. 40 */ 41 42 #define HIL_CLOCK 8MHZ 43 #define HIL_EK1_CLOCK 30HZ 44 #define HIL_EK2_CLOCK 60HZ 45 46 #define HIL_TIMEOUT_DEV 5 /* ms */ 47 #define HIL_TIMEOUT_DEVS 10 /* ms */ 48 #define HIL_TIMEOUT_NORESP 10 /* ms */ 49 #define HIL_TIMEOUT_DEVS_DATA 16 /* ms */ 50 #define HIL_TIMEOUT_SELFTEST 200 /* ms */ 51 52 53 /* Actual wire line coding. These will only be useful if someone is 54 * implementing a software MLC to run HIL devices on a non-parisc machine. 55 */ 56 57 #define HIL_WIRE_PACKET_LEN 15 58 enum hil_wire_bitpos { 59 HIL_WIRE_START = 0, 60 HIL_WIRE_ADDR2, 61 HIL_WIRE_ADDR1, 62 HIL_WIRE_ADDR0, 63 HIL_WIRE_COMMAND, 64 HIL_WIRE_DATA7, 65 HIL_WIRE_DATA6, 66 HIL_WIRE_DATA5, 67 HIL_WIRE_DATA4, 68 HIL_WIRE_DATA3, 69 HIL_WIRE_DATA2, 70 HIL_WIRE_DATA1, 71 HIL_WIRE_DATA0, 72 HIL_WIRE_PARITY, 73 HIL_WIRE_STOP 74 }; 75 76 /* HP documentation uses these bit positions to refer to commands; 77 * we will call these "packets". 78 */ 79 enum hil_pkt_bitpos { 80 HIL_PKT_CMD = 0x00000800, 81 HIL_PKT_ADDR2 = 0x00000400, 82 HIL_PKT_ADDR1 = 0x00000200, 83 HIL_PKT_ADDR0 = 0x00000100, 84 HIL_PKT_ADDR_MASK = 0x00000700, 85 HIL_PKT_ADDR_SHIFT = 8, 86 HIL_PKT_DATA7 = 0x00000080, 87 HIL_PKT_DATA6 = 0x00000040, 88 HIL_PKT_DATA5 = 0x00000020, 89 HIL_PKT_DATA4 = 0x00000010, 90 HIL_PKT_DATA3 = 0x00000008, 91 HIL_PKT_DATA2 = 0x00000004, 92 HIL_PKT_DATA1 = 0x00000002, 93 HIL_PKT_DATA0 = 0x00000001, 94 HIL_PKT_DATA_MASK = 0x000000FF, 95 HIL_PKT_DATA_SHIFT = 0 96 }; 97 98 /* The HIL MLC also has several error/status/control bits. We extend the 99 * "packet" to include these when direct access to the MLC is available, 100 * or emulate them in cases where they are not available. 101 * 102 * This way the device driver knows that the underlying MLC driver 103 * has had to deal with loop errors. 104 */ 105 enum hil_error_bitpos { 106 HIL_ERR_OB = 0x00000800, /* MLC is busy sending an auto-poll, 107 or we have filled up the output 108 buffer and must wait. */ 109 HIL_ERR_INT = 0x00010000, /* A normal interrupt has occurred. */ 110 HIL_ERR_NMI = 0x00020000, /* An NMI has occurred. */ 111 HIL_ERR_LERR = 0x00040000, /* A poll didn't come back. */ 112 HIL_ERR_PERR = 0x01000000, /* There was a Parity Error. */ 113 HIL_ERR_FERR = 0x02000000, /* There was a Framing Error. */ 114 HIL_ERR_FOF = 0x04000000 /* Input FIFO Overflowed. */ 115 }; 116 117 enum hil_control_bitpos { 118 HIL_CTRL_TEST = 0x00010000, 119 HIL_CTRL_IPF = 0x00040000, 120 HIL_CTRL_APE = 0x02000000 121 }; 122 123 /* Bits 30,31 are unused, we use them to control write behavior. */ 124 #define HIL_DO_ALTER_CTRL 0x40000000 /* Write MSW of packet to control 125 before writing LSW to loop */ 126 #define HIL_CTRL_ONLY 0xc0000000 /* *Only* alter the control registers */ 127 128 /* This gives us a 32-bit "packet" 129 */ 130 typedef u32 hil_packet; 131 132 133 /* HIL Loop commands 134 */ 135 enum hil_command { 136 HIL_CMD_IFC = 0x00, /* Interface Clear */ 137 HIL_CMD_EPT = 0x01, /* Enter Pass-Thru Mode */ 138 HIL_CMD_ELB = 0x02, /* Enter Loop-Back Mode */ 139 HIL_CMD_IDD = 0x03, /* Identify and Describe */ 140 HIL_CMD_DSR = 0x04, /* Device Soft Reset */ 141 HIL_CMD_PST = 0x05, /* Perform Self Test */ 142 HIL_CMD_RRG = 0x06, /* Read Register */ 143 HIL_CMD_WRG = 0x07, /* Write Register */ 144 HIL_CMD_ACF = 0x08, /* Auto Configure */ 145 HIL_CMDID_ACF = 0x07, /* Auto Configure bits with incremented ID */ 146 HIL_CMD_POL = 0x10, /* Poll */ 147 HIL_CMDCT_POL = 0x0f, /* Poll command bits with item count */ 148 HIL_CMD_RPL = 0x20, /* RePoll */ 149 HIL_CMDCT_RPL = 0x0f, /* RePoll command bits with item count */ 150 HIL_CMD_RNM = 0x30, /* Report Name */ 151 HIL_CMD_RST = 0x31, /* Report Status */ 152 HIL_CMD_EXD = 0x32, /* Extended Describe */ 153 HIL_CMD_RSC = 0x33, /* Report Security Code */ 154 155 /* 0x34 to 0x3c reserved for future use */ 156 157 HIL_CMD_DKA = 0x3d, /* Disable Keyswitch Autorepeat */ 158 HIL_CMD_EK1 = 0x3e, /* Enable Keyswitch Autorepeat 1 */ 159 HIL_CMD_EK2 = 0x3f, /* Enable Keyswitch Autorepeat 2 */ 160 HIL_CMD_PR1 = 0x40, /* Prompt1 */ 161 HIL_CMD_PR2 = 0x41, /* Prompt2 */ 162 HIL_CMD_PR3 = 0x42, /* Prompt3 */ 163 HIL_CMD_PR4 = 0x43, /* Prompt4 */ 164 HIL_CMD_PR5 = 0x44, /* Prompt5 */ 165 HIL_CMD_PR6 = 0x45, /* Prompt6 */ 166 HIL_CMD_PR7 = 0x46, /* Prompt7 */ 167 HIL_CMD_PRM = 0x47, /* Prompt (General Purpose) */ 168 HIL_CMD_AK1 = 0x48, /* Acknowlege1 */ 169 HIL_CMD_AK2 = 0x49, /* Acknowlege2 */ 170 HIL_CMD_AK3 = 0x4a, /* Acknowlege3 */ 171 HIL_CMD_AK4 = 0x4b, /* Acknowlege4 */ 172 HIL_CMD_AK5 = 0x4c, /* Acknowlege5 */ 173 HIL_CMD_AK6 = 0x4d, /* Acknowlege6 */ 174 HIL_CMD_AK7 = 0x4e, /* Acknowlege7 */ 175 HIL_CMD_ACK = 0x4f, /* Acknowlege (General Purpose) */ 176 177 /* 0x50 to 0x78 reserved for future use */ 178 /* 0x80 to 0xEF device-specific commands */ 179 /* 0xf0 to 0xf9 reserved for future use */ 180 181 HIL_CMD_RIO = 0xfa, /* Register I/O Error */ 182 HIL_CMD_SHR = 0xfb, /* System Hard Reset */ 183 HIL_CMD_TER = 0xfc, /* Transmission Error */ 184 HIL_CMD_CAE = 0xfd, /* Configuration Address Error */ 185 HIL_CMD_DHR = 0xfe, /* Device Hard Reset */ 186 187 /* 0xff is prohibited from use. */ 188 }; 189 190 191 /* 192 * Response "records" to HIL commands 193 */ 194 195 /* Device ID byte 196 */ 197 #define HIL_IDD_DID_TYPE_MASK 0xe0 /* Primary type bits */ 198 #define HIL_IDD_DID_TYPE_KB_INTEGRAL 0xa0 /* Integral keyboard */ 199 #define HIL_IDD_DID_TYPE_KB_ITF 0xc0 /* ITD keyboard */ 200 #define HIL_IDD_DID_TYPE_KB_RSVD 0xe0 /* Reserved keyboard type */ 201 #define HIL_IDD_DID_TYPE_KB_LANG_MASK 0x1f /* Keyboard locale bits */ 202 #define HIL_IDD_DID_KBLANG_USE_ESD 0x00 /* Use ESD Locale instead */ 203 #define HIL_IDD_DID_TYPE_ABS 0x80 /* Absolute Positioners */ 204 #define HIL_IDD_DID_ABS_RSVD1_MASK 0xf8 /* Reserved */ 205 #define HIL_IDD_DID_ABS_RSVD1 0x98 206 #define HIL_IDD_DID_ABS_TABLET_MASK 0xf8 /* Tablets and digitizers */ 207 #define HIL_IDD_DID_ABS_TABLET 0x90 208 #define HIL_IDD_DID_ABS_TSCREEN_MASK 0xfc /* Touch screens */ 209 #define HIL_IDD_DID_ABS_TSCREEN 0x8c 210 #define HIL_IDD_DID_ABS_RSVD2_MASK 0xfc /* Reserved */ 211 #define HIL_IDD_DID_ABS_RSVD2 0x88 212 #define HIL_IDD_DID_ABS_RSVD3_MASK 0xfc /* Reserved */ 213 #define HIL_IDD_DID_ABS_RSVD3 0x80 214 #define HIL_IDD_DID_TYPE_REL 0x60 /* Relative Positioners */ 215 #define HIL_IDD_DID_REL_RSVD1_MASK 0xf0 /* Reserved */ 216 #define HIL_IDD_DID_REL_RSVD1 0x70 217 #define HIL_IDD_DID_REL_RSVD2_MASK 0xfc /* Reserved */ 218 #define HIL_IDD_DID_REL_RSVD2 0x6c 219 #define HIL_IDD_DID_REL_MOUSE_MASK 0xfc /* Mouse */ 220 #define HIL_IDD_DID_REL_MOUSE 0x68 221 #define HIL_IDD_DID_REL_QUAD_MASK 0xf8 /* Other Quadrature Devices */ 222 #define HIL_IDD_DID_REL_QUAD 0x60 223 #define HIL_IDD_DID_TYPE_CHAR 0x40 /* Character Entry */ 224 #define HIL_IDD_DID_CHAR_BARCODE_MASK 0xfc /* Barcode Reader */ 225 #define HIL_IDD_DID_CHAR_BARCODE 0x5c 226 #define HIL_IDD_DID_CHAR_RSVD1_MASK 0xfc /* Reserved */ 227 #define HIL_IDD_DID_CHAR_RSVD1 0x58 228 #define HIL_IDD_DID_CHAR_RSVD2_MASK 0xf8 /* Reserved */ 229 #define HIL_IDD_DID_CHAR_RSVD2 0x50 230 #define HIL_IDD_DID_CHAR_RSVD3_MASK 0xf0 /* Reserved */ 231 #define HIL_IDD_DID_CHAR_RSVD3 0x40 232 #define HIL_IDD_DID_TYPE_OTHER 0x20 /* Miscellaneous */ 233 #define HIL_IDD_DID_OTHER_RSVD1_MASK 0xf0 /* Reserved */ 234 #define HIL_IDD_DID_OTHER_RSVD1 0x30 235 #define HIL_IDD_DID_OTHER_BARCODE_MASK 0xfc /* Tone Generator */ 236 #define HIL_IDD_DID_OTHER_BARCODE 0x2c 237 #define HIL_IDD_DID_OTHER_RSVD2_MASK 0xfc /* Reserved */ 238 #define HIL_IDD_DID_OTHER_RSVD2 0x28 239 #define HIL_IDD_DID_OTHER_RSVD3_MASK 0xf8 /* Reserved */ 240 #define HIL_IDD_DID_OTHER_RSVD3 0x20 241 #define HIL_IDD_DID_TYPE_KEYPAD 0x00 /* Vectra Keyboard */ 242 243 /* IDD record header 244 */ 245 #define HIL_IDD_HEADER_AXSET_MASK 0x03 /* Number of axis in a set */ 246 #define HIL_IDD_HEADER_RSC 0x04 /* Supports RSC command */ 247 #define HIL_IDD_HEADER_EXD 0x08 /* Supports EXD command */ 248 #define HIL_IDD_HEADER_IOD 0x10 /* IOD byte to follow */ 249 #define HIL_IDD_HEADER_16BIT 0x20 /* 16 (vs. 8) bit resolution */ 250 #define HIL_IDD_HEADER_ABS 0x40 /* Reports Absolute Position */ 251 #define HIL_IDD_HEADER_2X_AXIS 0x80 /* Two sets of 1-3 axis */ 252 253 /* I/O Descriptor 254 */ 255 #define HIL_IDD_IOD_NBUTTON_MASK 0x07 /* Number of buttons */ 256 #define HIL_IDD_IOD_PROXIMITY 0x08 /* Proximity in/out events */ 257 #define HIL_IDD_IOD_PROMPT_MASK 0x70 /* Number of prompts/acks */ 258 #define HIL_IDD_IOD_PROMPT_SHIFT 4 259 #define HIL_IDD_IOD_PROMPT 0x80 /* Generic prompt/ack */ 260 261 #define HIL_IDD_NUM_AXES_PER_SET(header_packet) \ 262 ((header_packet) & HIL_IDD_HEADER_AXSET_MASK) 263 264 #define HIL_IDD_NUM_AXSETS(header_packet) \ 265 (2 - !((header_packet) & HIL_IDD_HEADER_2X_AXIS)) 266 267 #define HIL_IDD_LEN(header_packet) \ 268 ((4 - !(header_packet & HIL_IDD_HEADER_IOD) - \ 269 2 * !(HIL_IDD_NUM_AXES_PER_SET(header_packet))) + \ 270 2 * HIL_IDD_NUM_AXES_PER_SET(header_packet) * \ 271 !!((header_packet) & HIL_IDD_HEADER_ABS)) 272 273 /* The following HIL_IDD_* macros assume you have an array of 274 * packets and/or unpacked 8-bit data in the order that they 275 * were received. 276 */ 277 278 #define HIL_IDD_AXIS_COUNTS_PER_M(header_ptr) \ 279 (!(HIL_IDD_NUM_AXSETS(*(header_ptr))) ? -1 : \ 280 (((*(header_ptr + 1) & HIL_PKT_DATA_MASK) + \ 281 ((*(header_ptr + 2) & HIL_PKT_DATA_MASK)) << 8) \ 282 * ((*(header_ptr) & HIL_IDD_HEADER_16BIT) ? 100 : 1))) 283 284 #define HIL_IDD_AXIS_MAX(header_ptr, __axnum) \ 285 ((!(*(header_ptr) & HIL_IDD_HEADER_ABS) || \ 286 (HIL_IDD_NUM_AXES_PER_SET(*(header_ptr)) <= __axnum)) ? 0 : \ 287 ((HIL_PKT_DATA_MASK & *((header_ptr) + 3 + 2 * __axnum)) + \ 288 ((HIL_PKT_DATA_MASK & *((header_ptr) + 4 + 2 * __axnum)) << 8))) 289 290 #define HIL_IDD_IOD(header_ptr) \ 291 (*(header_ptr + HIL_IDD_LEN((*header_ptr)) - 1)) 292 293 #define HIL_IDD_HAS_GEN_PROMPT(header_ptr) \ 294 ((*header_ptr & HIL_IDD_HEADER_IOD) && \ 295 (HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_PROMPT)) 296 297 #define HIL_IDD_HAS_GEN_PROXIMITY(header_ptr) \ 298 ((*header_ptr & HIL_IDD_HEADER_IOD) && \ 299 (HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_PROXIMITY)) 300 301 #define HIL_IDD_NUM_BUTTONS(header_ptr) \ 302 ((*header_ptr & HIL_IDD_HEADER_IOD) ? \ 303 (HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_NBUTTON_MASK) : 0) 304 305 #define HIL_IDD_NUM_PROMPTS(header_ptr) \ 306 ((*header_ptr & HIL_IDD_HEADER_IOD) ? \ 307 ((HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_NPROMPT_MASK) \ 308 >> HIL_IDD_IOD_PROMPT_SHIFT) : 0) 309 310 /* The response to HIL EXD commands -- the "extended describe record" */ 311 #define HIL_EXD_HEADER_WRG 0x03 /* Supports type2 WRG */ 312 #define HIL_EXD_HEADER_WRG_TYPE1 0x01 /* Supports type1 WRG */ 313 #define HIL_EXD_HEADER_WRG_TYPE2 0x02 /* Supports type2 WRG */ 314 #define HIL_EXD_HEADER_RRG 0x04 /* Supports RRG command */ 315 #define HIL_EXD_HEADER_RNM 0x10 /* Supports RNM command */ 316 #define HIL_EXD_HEADER_RST 0x20 /* Supports RST command */ 317 #define HIL_EXD_HEADER_LOCALE 0x40 /* Contains locale code */ 318 319 #define HIL_EXD_NUM_RRG(header_ptr) \ 320 ((*header_ptr & HIL_EXD_HEADER_RRG) ? \ 321 (*(header_ptr + 1) & HIL_PKT_DATA_MASK) : 0) 322 323 #define HIL_EXD_NUM_WWG(header_ptr) \ 324 ((*header_ptr & HIL_EXD_HEADER_WRG) ? \ 325 (*(header_ptr + 2 - !(*header_ptr & HIL_EXD_HEADER_RRG)) & \ 326 HIL_PKT_DATA_MASK) : 0) 327 328 #define HIL_EXD_LEN(header_ptr) \ 329 (!!(*header_ptr & HIL_EXD_HEADER_RRG) + \ 330 !!(*header_ptr & HIL_EXD_HEADER_WRG) + \ 331 !!(*header_ptr & HIL_EXD_HEADER_LOCALE) + \ 332 2 * !!(*header_ptr & HIL_EXD_HEADER_WRG_TYPE2) + 1) 333 334 #define HIL_EXD_LOCALE(header_ptr) \ 335 (!(*header_ptr & HIL_EXD_HEADER_LOCALE) ? -1 : \ 336 (*(header_ptr + HIL_EXD_LEN(header_ptr) - 1) & HIL_PKT_DATA_MASK)) 337 338 #define HIL_EXD_WRG_TYPE2_LEN(header_ptr) \ 339 (!(*header_ptr & HIL_EXD_HEADER_WRG_TYPE2) ? -1 : \ 340 (*(header_ptr + HIL_EXD_LEN(header_ptr) - 2 - \ 341 !!(*header_ptr & HIL_EXD_HEADER_LOCALE)) & HIL_PKT_DATA_MASK) + \ 342 ((*(header_ptr + HIL_EXD_LEN(header_ptr) - 1 - \ 343 !!(*header_ptr & HIL_EXD_HEADER_LOCALE)) & HIL_PKT_DATA_MASK) << 8)) 344 345 /* Device locale codes. */ 346 347 /* Last defined locale code. Everything above this is "Reserved", 348 and note that this same table applies to the Device ID Byte where 349 keyboards may have a nationality code which is only 5 bits. */ 350 #define HIL_LOCALE_MAX 0x1f 351 352 /* Map to hopefully useful strings. I was trying to make these look 353 like locale.aliases strings do; maybe that isn't the right table to 354 emulate. In either case, I didn't have much to work on. */ 355 #define HIL_LOCALE_MAP \ 356 "", /* 0x00 Reserved */ \ 357 "", /* 0x01 Reserved */ \ 358 "", /* 0x02 Reserved */ \ 359 "swiss.french", /* 0x03 Swiss/French */ \ 360 "portuguese", /* 0x04 Portuguese */ \ 361 "arabic", /* 0x05 Arabic */ \ 362 "hebrew", /* 0x06 Hebrew */ \ 363 "english.canadian", /* 0x07 Canadian English */ \ 364 "turkish", /* 0x08 Turkish */ \ 365 "greek", /* 0x09 Greek */ \ 366 "thai", /* 0x0a Thai (Thailand) */ \ 367 "italian", /* 0x0b Italian */ \ 368 "korean", /* 0x0c Hangul (Korea) */ \ 369 "dutch", /* 0x0d Dutch */ \ 370 "swedish", /* 0x0e Swedish */ \ 371 "german", /* 0x0f German */ \ 372 "chinese", /* 0x10 Chinese-PRC */ \ 373 "chinese", /* 0x11 Chinese-ROC */ \ 374 "swiss.french", /* 0x12 Swiss/French II */ \ 375 "spanish", /* 0x13 Spanish */ \ 376 "swiss.german", /* 0x14 Swiss/German II */ \ 377 "flemish", /* 0x15 Belgian (Flemish) */ \ 378 "finnish", /* 0x16 Finnish */ \ 379 "english.uk", /* 0x17 United Kingdom */ \ 380 "french.canadian", /* 0x18 French/Canadian */ \ 381 "swiss.german", /* 0x19 Swiss/German */ \ 382 "norwegian", /* 0x1a Norwegian */ \ 383 "french", /* 0x1b French */ \ 384 "danish", /* 0x1c Danish */ \ 385 "japanese", /* 0x1d Katakana */ \ 386 "spanish", /* 0x1e Latin American/Spanish*/\ 387 "english.us" /* 0x1f United States */ \ 388 389 390 /* Response to POL command, the "poll record header" */ 391 392 #define HIL_POL_NUM_AXES_MASK 0x03 /* Number of axis reported */ 393 #define HIL_POL_CTS 0x04 /* Device ready to receive data */ 394 #define HIL_POL_STATUS_PENDING 0x08 /* Device has status to report */ 395 #define HIL_POL_CHARTYPE_MASK 0x70 /* Type of character data to follow */ 396 #define HIL_POL_CHARTYPE_NONE 0x00 /* No character data to follow */ 397 #define HIL_POL_CHARTYPE_RSVD1 0x10 /* Reserved Set 1 */ 398 #define HIL_POL_CHARTYPE_ASCII 0x20 /* U.S. ASCII */ 399 #define HIL_POL_CHARTYPE_BINARY 0x30 /* Binary data */ 400 #define HIL_POL_CHARTYPE_SET1 0x40 /* Keycode Set 1 */ 401 #define HIL_POL_CHARTYPE_RSVD2 0x50 /* Reserved Set 2 */ 402 #define HIL_POL_CHARTYPE_SET2 0x60 /* Keycode Set 2 */ 403 #define HIL_POL_CHARTYPE_SET3 0x70 /* Keycode Set 3 */ 404 #define HIL_POL_AXIS_ALT 0x80 /* Data is from axis set 2 */ 405 406