[USB]
[reactos.git] / reactos / include / ddk / hidport.h
1 #pragma once
2
3 #include <hidclass.h>
4
5 typedef struct _HID_MINIDRIVER_REGISTRATION
6 {
7 ULONG Revision;
8 PDRIVER_OBJECT DriverObject;
9 PUNICODE_STRING RegistryPath;
10 ULONG DeviceExtensionSize;
11 BOOLEAN DevicesArePolled;
12 UCHAR Reserved[3];
13 }HID_MINIDRIVER_REGISTRATION, *PHID_MINIDRIVER_REGISTRATION;
14
15 typedef struct _HID_DEVICE_EXTENSION
16 {
17 PDEVICE_OBJECT PhysicalDeviceObject;
18 PDEVICE_OBJECT NextDeviceObject;
19 PVOID MiniDeviceExtension;
20 }HID_DEVICE_EXTENSION, *PHID_DEVICE_EXTENSION;
21
22 typedef struct _HID_DEVICE_ATTRIBUTES
23 {
24 ULONG Size;
25 USHORT VendorID;
26 USHORT ProductID;
27 USHORT VersionNumber;
28 USHORT Reserved[11];
29 }HID_DEVICE_ATTRIBUTES, * PHID_DEVICE_ATTRIBUTES;
30
31 #include <pshpack1.h>
32
33 typedef struct _HID_DESCRIPTOR
34 {
35 UCHAR bLength;
36 UCHAR bDescriptorType;
37 USHORT bcdHID;
38 UCHAR bCountry;
39 UCHAR bNumDescriptors;
40
41 struct _HID_DESCRIPTOR_DESC_LIST
42 {
43 UCHAR bReportType;
44 USHORT wReportLength;
45 }DescriptorList [1];
46 }HID_DESCRIPTOR, * PHID_DESCRIPTOR;
47
48 #include <poppack.h>
49
50 #define HID_HID_DESCRIPTOR_TYPE 0x21
51 #define HID_REPORT_DESCRIPTOR_TYPE 0x22
52 #define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23
53
54
55
56 typedef
57 VOID
58 (NTAPI *HID_SEND_IDLE_CALLBACK)(
59 IN PVOID Context
60 );
61
62 typedef struct _HID_SUBMIT_IDLE_NOTIFICATION_CALLBACK_INFO
63 {
64 HID_SEND_IDLE_CALLBACK IdleCallback;
65 PVOID IdleContext;
66 }HID_SUBMIT_IDLE_NOTIFICATION_CALLBACK_INFO, *PHID_SUBMIT_IDLE_NOTIFICATION_CALLBACK_INFO;
67
68 NTSTATUS
69 NTAPI
70 HidRegisterMinidriver(
71 IN PHID_MINIDRIVER_REGISTRATION MinidriverRegistration
72 );
73
74 #if(NTDDI_VERSION>=NTDDI_WINXPSP1)
75
76 NTSTATUS
77 HidNotifyPresence(
78 IN PDEVICE_OBJECT DeviceObject,
79 IN BOOLEAN IsPresent
80 );
81
82 #endif
83
84 #define IOCTL_HID_GET_DEVICE_DESCRIPTOR HID_CTL_CODE(0)
85 #define IOCTL_HID_GET_REPORT_DESCRIPTOR HID_CTL_CODE(1)
86 #define IOCTL_HID_READ_REPORT HID_CTL_CODE(2)
87 #define IOCTL_HID_WRITE_REPORT HID_CTL_CODE(3)
88 #define IOCTL_HID_GET_STRING HID_CTL_CODE(4)
89 #define IOCTL_HID_ACTIVATE_DEVICE HID_CTL_CODE(7)
90 #define IOCTL_HID_DEACTIVATE_DEVICE HID_CTL_CODE(8)
91 #define IOCTL_HID_GET_DEVICE_ATTRIBUTES HID_CTL_CODE(9)
92 #define IOCTL_HID_SEND_IDLE_NOTIFICATION_REQUEST HID_CTL_CODE(10)
93
94 #define HID_HID_DESCRIPTOR_TYPE 0x21
95 #define HID_REPORT_DESCRIPTOR_TYPE 0x22
96 #define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23
97
98 #define HID_STRING_ID_IMANUFACTURER 14
99 #define HID_STRING_ID_IPRODUCT 15
100 #define HID_STRING_ID_ISERIALNUMBER 16