/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_USB_USBKBM_H
#define _SYS_USB_USBKBM_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/vuid_event.h>
/*
* USB keyboard LED masks (used to set LED's on USB keyboards)
*/
/* Modifier key masks */
/*
* The keyboard would report ErrorRollOver in all array fields when
* the number of non-modifier keys pressed exceeds the Report Count.
*/
/*
* This defines the format of translation tables.
*
* A translation table is USB_KEYMAP_SIZE "entries", each of which is 2
* bytes (unsigned shorts). The top 8 bits of each entry are decoded by
* a case statement in getkey.c. If the entry is less than 0x100, it
* is sent out as an EUC character (possibly with bucky bits
* OR-ed in). "Special" entries are 0x100 or greater, and
* invoke more complicated actions.
*/
/*
* HID-spec-defined report size (in bytes) for each USB HID boot-protocol
* mode report.
*/
/* definitions for various state machines */
/*
* Polled key state
*/
typedef struct poll_keystate {
typedef struct usbkbm_report_format {
/* state structure for usbkbm */
typedef struct usbkbm_state {
int usbkbm_flags;
/* Report format of keyboard data */
/* Pointer to the parser handle */
/*
* Setting this indicates that the second IOCTL
* after KBD_CMD_SETLED follows
*/
/* Keyboard packets sent last */
/* Currently processed key events of the current keyboard packet */
/* "ioctl" awaiting buffer */
/* id from qbufcall on allocb failure */
/* Polled input information */
int usbkbm_vkbd_type;
/* keyboard device info from hid */
/* These entries are for polled input */
/* Boot protocol or report protocol */
/* Sun Japanese type6 and type7 keyboards layout numbers, vid and pid */
/* Number of entries in the keytable */
/* Size in bytes of the keytable */
/* structure to save global state */
typedef struct usbkbm_save_state {
/* LED state */
/* Keymap information */
/*
* Masks for debug printing
*/
#ifdef __cplusplus
}
#endif
#endif /* _SYS_USB_USBKBM_H */