* Made header self-contained.

* Added missing license.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31667 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-07-21 09:24:07 +00:00
parent 0aea5c18d4
commit f74fedd9ba

View File

@ -1,5 +1,13 @@
#ifndef USB_HID_H
#define USB_HID_H
/*
* Copyright 2004-2009, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _USB_HID_H
#define _USB_HID_H
#include <SupportDefs.h>
// (Partial) USB Class Definitions for HID Devices, version 1.11
// Reference: http://www.usb.org/developers/devclass_docs/hid1_11.pdf
@ -7,22 +15,25 @@
#define USB_HID_DEVICE_CLASS 0x03
#define USB_HID_CLASS_VERSION 0x0100
enum { // HID Interface Subclasses
// HID Interface Subclasses
enum {
USB_HID_INTERFACE_NO_SUBCLASS = 0x00, // No Subclass
USB_HID_INTERFACE_BOOT_SUBCLASS // Boot Interface Subclass
};
enum { // HID Class-Specific descriptor subtypes
// HID Class-Specific descriptor subtypes
enum {
USB_HID_DESCRIPTOR_HID = 0x21,
USB_HID_DESCRIPTOR_REPORT,
USB_HID_DESCRIPTOR_PHYSICAL
};
enum { // HID Class-specific requests
// HID Class-specific requests
enum {
USB_REQUEST_HID_GET_REPORT = 0x01,
USB_REQUEST_HID_GET_IDLE,
USB_REQUEST_HID_GET_PROTOCOL,
USB_REQUEST_HID_SET_REPORT = 0x09,
USB_REQUEST_HID_SET_IDLE,
USB_REQUEST_HID_SET_PROTOCOL
@ -41,9 +52,7 @@ typedef struct {
} _PACKED usb_hid_descriptor;
/*
Usage Pages/IDs
*/
/* Usage Pages/IDs */
enum {
USAGE_PAGE_GENERIC_DESKTOP = 0x1,
@ -76,7 +85,7 @@ enum {
USAGE_ID_KEYBOARD,
USAGE_ID_KEYPAD,
USAGE_ID_MULTIAXIS = 0x8,
USAGE_ID_X = 0x30,
USAGE_ID_Y,
USAGE_ID_Z,
@ -109,4 +118,4 @@ enum {
USAGE_ID_THROTTLE = 0xBB,
};
#endif // USB_HID_H
#endif // _USB_HID_H