hid.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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_USB_HID_H
#define _SYS_USB_HID_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define USB_DESCR_TYPE_HID 0x21
/*
* HID : This header file defines the interface between the hid
* module and the hid driver.
*/
/*
* There is an M_CTL command per class specific HID command defined in
* section 7.2 of the specification.
*/
/*
* Hid descriptor
*/
typedef struct usb_hid_descr {
/*
* Hid will turn the M_CTL request into a request control request on the
* default pipe. Hid needs the following information in the hid_req_t
* structure. See the details below for specific values for each command.
*/
typedef struct hid_req_struct {
} hid_req_t;
/*
* hid_req_wValue values HID_GET_REPORT and HID_SET_REPORT
*/
/*
* hid_req_wLength value for HID_GET_IDLE and HID_SET_IDLE
*/
#define GET_IDLE_LENGTH 0x0001
#define SET_IDLE_LENGTH 0x0000
/*
* hid_req_wValue values for SET_PROTOCOL
*/
/*
* return values for GET_PROTOCOL
*/
/*
* There is an additional M_CTL command for obtaining the
* hid parser handle. This M_CTL returns a pointer to the handle.
* The type of the pointer is intpr_t because this type is large enough to
* hold any data pointer.
*/
/*
* M_CTL commands for event notifications
*/
#define HID_POWER_OFF 0x00DC
#define HID_FULL_POWER 0x00DD
#define HID_DISCONNECT_EVENT 0x00DE
#define HID_CONNECT_EVENT 0x00DF
/*
* To get the report descriptor,
* This is the wValue
*/
#define USB_CLASS_DESCR_TYPE_REPORT 0x2200
/* Version numbers */
#define HID_VERSION_V_0 0
#ifdef __cplusplus
}
#endif
#endif /* _SYS_USB_HID_H */