Sync to trunk revision 63857.
[reactos.git] / drivers / hid / hidusb / hidusb.h
index 332c6db..9209362 100644 (file)
@@ -2,6 +2,7 @@
 
 #define _HIDPI_
 #define _HIDPI_NO_FUNCTION_MACROS_
+#define NDEBUG
 #include <ntddk.h>
 #include <hidport.h>
 #include <debug.h>
@@ -11,6 +12,8 @@
 #include <usb.h>
 #include <usbdlib.h>
 
+#include <hidport.h>
+
 typedef struct
 {
     //
@@ -18,11 +21,6 @@ typedef struct
     //
     KEVENT Event;
 
-    //
-    // list for pending requests
-    //
-    LIST_ENTRY PendingRequests;
-
     //
     // device descriptor
     //
@@ -47,5 +45,47 @@ typedef struct
     // hid descriptor
     //
     PHID_DESCRIPTOR HidDescriptor;
-}HID_USB_DEVICE_EXTENSION, *PHID_USB_DEVICE_EXTENSION;
 
+} HID_USB_DEVICE_EXTENSION, *PHID_USB_DEVICE_EXTENSION;
+
+typedef struct
+{
+    //
+    // request irp
+    //
+    PIRP Irp;
+
+    //
+    // work item
+    //
+    PIO_WORKITEM WorkItem;
+
+    //
+    // device object
+    //
+    PDEVICE_OBJECT DeviceObject;
+
+} HID_USB_RESET_CONTEXT, *PHID_USB_RESET_CONTEXT;
+
+
+NTSTATUS
+Hid_GetDescriptor(
+    IN PDEVICE_OBJECT DeviceObject,
+    IN USHORT UrbFunction,
+    IN USHORT UrbLength,
+    IN OUT PVOID *UrbBuffer,
+    IN OUT PULONG UrbBufferLength,
+    IN UCHAR DescriptorType,
+    IN UCHAR Index,
+    IN USHORT LanguageIndex);
+
+NTSTATUS
+Hid_DispatchUrb(
+    IN PDEVICE_OBJECT DeviceObject,
+    IN PURB Urb);
+
+#define USB_SET_IDLE_REQUEST 0xA
+#define USB_GET_PROTOCOL_REQUEST 0x3
+
+#define HIDUSB_TAG 'UdiH'
+#define HIDUSB_URB_TAG 'rUiH'