kb8042.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _KB8042_H
#define _KB8042_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Messages from keyboard.
*/
/*
* Commands to keyboard.
*/
/*
* LED bits
*/
/*
* Keyboard scan code prefixes
*/
/*
* Korean keyboard keys. We handle these specially to avoid having to
* dramatically extend the table.
*/
#define KXT_HANGUL_HANJA 0xf1
#define KXT_HANGUL 0xf2
#ifdef _KERNEL
struct kb8042 {
int w_init; /* workstation has been initialized */
int w_kblayout; /* keyboard layout code */
int kb_old_key_pos; /* scancode for autorepeat filtering */
int command_state;
struct {
int desired;
int commanded;
} leds;
int parse_scan_state;
struct kbtrans *hw_kbtrans;
struct cons_polledio polledio;
struct {
unsigned char mod1;
unsigned char mod2;
unsigned char trigger;
} debugger;
int simulated_kbd_type;
};
#define KB_COMMAND_STATE_IDLE 0
#define KB_COMMAND_STATE_LED 1
#define KB_COMMAND_STATE_WAIT 2
extern void KeyboardConvertScan_init(struct kb8042 *);
#if defined(i86pc)
/*
* We pick up the initial state of the keyboard from the BIOS state.
*/
#define BIOS_SCROLL_STATE 0x10
#define BIOS_NUM_STATE 0x20
#define BIOS_CAPS_STATE 0x40
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif /* _KB8042_H */