[HIDUSB]
[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 #include <hidport.h>
16
17 typedef struct
18 {
19 //
20 // event for completion
21 //
22 KEVENT Event;
23
24 //
25 // device descriptor
26 //
27 PUSB_DEVICE_DESCRIPTOR DeviceDescriptor;
28
29 //
30 // configuration descriptor
31 //
32 PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor;
33
34 //
35 // interface information
36 //
37 PUSBD_INTERFACE_INFORMATION InterfaceInfo;
38
39 //
40 // configuration handle
41 //
42 USBD_CONFIGURATION_HANDLE ConfigurationHandle;
43
44 //
45 // hid descriptor
46 //
47 PHID_DESCRIPTOR HidDescriptor;
48 }HID_USB_DEVICE_EXTENSION, *PHID_USB_DEVICE_EXTENSION;
49
50 typedef struct
51 {
52 //
53 // request irp
54 //
55 PIRP Irp;
56
57 //
58 // work item
59 //
60 PIO_WORKITEM WorkItem;
61
62 //
63 // device object
64 //
65 PDEVICE_OBJECT DeviceObject;
66
67 }HID_USB_RESET_CONTEXT, *PHID_USB_RESET_CONTEXT;
68
69
70 NTSTATUS
71 Hid_GetDescriptor(
72 IN PDEVICE_OBJECT DeviceObject,
73 IN USHORT UrbFunction,
74 IN USHORT UrbLength,
75 IN OUT PVOID *UrbBuffer,
76 IN OUT PULONG UrbBufferLength,
77 IN UCHAR DescriptorType,
78 IN UCHAR Index,
79 IN USHORT LanguageIndex);
80
81 NTSTATUS
82 Hid_DispatchUrb(
83 IN PDEVICE_OBJECT DeviceObject,
84 IN PURB Urb);
85
86 #define USB_SET_IDLE_REQUEST 0xA
87 #define USB_GET_PROTOCOL_REQUEST 0x3
88