patch-2.3.40 linux/drivers/usb/hid.h
Next file: linux/drivers/usb/hub.c
Previous file: linux/drivers/usb/hid.c
Back to the patch index
Back to the overall index
- Lines: 123
- Date:
Thu Jan 20 09:48:48 2000
- Orig file:
v2.3.39/linux/drivers/usb/hid.h
- Orig date:
Tue Jan 4 13:57:17 2000
diff -u --recursive --new-file v2.3.39/linux/drivers/usb/hid.h linux/drivers/usb/hid.h
@@ -4,8 +4,8 @@
/*
* drivers/usb/hid.h Version 0.8
*
- * Copyright (c) 1999 Vojtech Pavlik
* Copyright (c) 1999 Andreas Gal
+ * Copyright (c) 2000 Vojtech Pavlik
*
* Sponsored by SuSE
*/
@@ -36,37 +36,12 @@
#include <linux/list.h>
/*
- * Enable/Disable debug information.
- */
-
-#ifdef CONFIG_USB_HID_DEBUG
-#define hid_debug(fmt,arg...) printk(KERN_DEBUG "hid: " fmt "\n" , ##arg)
-#else
-#define hid_debug(fmt,arg...) do { } while (0)
-#endif
-
-/*
* USB HID (Human Interface Device) interface class code
*/
#define USB_INTERFACE_CLASS_HID 3
/*
- * USB interface subclass codes.
- */
-
-#define USB_INTERFACE_SUBCLASS_NONE 0
-#define USB_INTERFACE_SUBCLASS_HID_BP 1
-
-/*
- * HID protocol codes (only for boot protocol)
- */
-
-#define HID_PROTOCOL_NONE 0
-#define HID_PROTOCOL_KBD 1
-#define HID_PROTOCOL_MOUSE 2
-
-/*
* We parse each description item into this structure. Short items data
* values are expanded to 32-bit signed int, long items contain a pointer
* into the data area.
@@ -122,7 +97,6 @@
/*
* HID report descriptor main item contents
- * Warning: VOLATILE is not available for TAG_INPUT
*/
#define HID_MAIN_ITEM_CONSTANT 0x001
@@ -196,18 +170,6 @@
#define HID_GD_HATSWITCH 0x00010039
/*
- * HID interface requests (this belongs here, the USB_REQ_xxx stuff should
- * disapear).
- */
-
-#define HID_REQ_GET_REPORT 0x01
-#define HID_REQ_GET_IDLE 0x02
-#define HID_REQ_GET_PROTOCOL 0x03
-#define HID_REQ_SET_REPORT 0x09
-#define HID_REQ_SET_IDLE 0x0A
-#define HID_REQ_SET_PROTOCOL 0x0B
-
-/*
* HID report types --- Ouch! HID spec says 1 2 3!
*/
@@ -216,13 +178,6 @@
#define HID_FEATURE_REPORT 2
/*
- * HID protocols
- */
-
-#define HID_PROTOCOL_BOOT 0
-#define HID_PROTOCOL_REPORT 1
-
-/*
* This is the global enviroment of the parser. This information is
* persistent for main-items. The global enviroment can be saved and
* restored with PUSH/POP statements.
@@ -324,7 +279,10 @@
int ifnum; /* USB interface number */
char buffer[32]; /* Receive buffer */
+ char bufout[32]; /* Transmit buffer */
+ devrequest dr; /* Startup packet */
struct urb urb; /* USB URB structure */
+ struct urb urbout; /* Output URB */
struct input_dev input; /* input device structure */
};
@@ -340,6 +298,22 @@
unsigned collection_stack_ptr;
struct hid_device *device;
};
+
+struct hid_class_descriptor {
+ __u8 bDescriptorType;
+ __u16 wDescriptorLength;
+} __attribute__ ((packed));
+
+struct hid_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u16 bcdHID;
+ __u8 bCountryCode;
+ __u8 bNumDescriptors;
+
+ struct hid_class_descriptor desc[1];
+} __attribute__ ((packed));
+
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)