[USB-BRINGUP]
[reactos.git] / drivers / hid / hidusb / hidusb.h
1 #pragma once
2
3 #define _HIDPI_
4 #define _HIDPI_NO_FUNCTION_MACROS_
5 #define NDEBUG
6 #include <ntddk.h>
7 #include <hidport.h>
8 #include <debug.h>
9 #include <hubbusif.h>
10 #include <usbbusif.h>
11 #include <usbioctl.h>
12 #include <usb.h>
13 #include <usbdlib.h>
14
15 typedef struct
16 {
17 //
18 // event for completion
19 //
20 KEVENT Event;
21
22 //
23 // device descriptor
24 //
25 PUSB_DEVICE_DESCRIPTOR DeviceDescriptor;
26
27 //
28 // configuration descriptor
29 //
30 PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor;
31
32 //
33 // interface information
34 //
35 PUSBD_INTERFACE_INFORMATION InterfaceInfo;
36
37 //
38 // configuration handle
39 //
40 USBD_CONFIGURATION_HANDLE ConfigurationHandle;
41
42 //
43 // hid descriptor
44 //
45 PHID_DESCRIPTOR HidDescriptor;
46 }HID_USB_DEVICE_EXTENSION, *PHID_USB_DEVICE_EXTENSION;
47
48 typedef struct
49 {
50 //
51 // request irp
52 //
53 PIRP Irp;
54
55 //
56 // work item
57 //
58 PIO_WORKITEM WorkItem;
59
60 //
61 // device object
62 //
63 PDEVICE_OBJECT DeviceObject;
64
65 }HID_USB_RESET_CONTEXT, *PHID_USB_RESET_CONTEXT;
66
67
68 NTSTATUS
69 Hid_GetDescriptor(
70 IN PDEVICE_OBJECT DeviceObject,
71 IN USHORT UrbFunction,
72 IN USHORT UrbLength,
73 IN OUT PVOID *UrbBuffer,
74 IN OUT PULONG UrbBufferLength,
75 IN UCHAR DescriptorType,
76 IN UCHAR Index,
77 IN USHORT LanguageIndex);
78
79 NTSTATUS
80 Hid_DispatchUrb(
81 IN PDEVICE_OBJECT DeviceObject,
82 IN PURB Urb);