[USB-BRINGUP-TRUNK]
[reactos.git] / include / ddk / hidpddi.h
1 #ifndef _HIDPDDI_H
2 #define _HIDPDDI_H
3
4 #include "hidusage.h"
5 #include "hidpi.h"
6
7 typedef struct _HIDP_COLLECTION_DESC
8 {
9 USAGE UsagePage;
10 USAGE Usage;
11 UCHAR CollectionNumber;
12 UCHAR Reserved [15];
13 USHORT InputLength;
14 USHORT OutputLength;
15 USHORT FeatureLength;
16 USHORT PreparsedDataLength;
17 PHIDP_PREPARSED_DATA PreparsedData;
18 }HIDP_COLLECTION_DESC, *PHIDP_COLLECTION_DESC;
19
20 typedef struct _HIDP_REPORT_IDS
21 {
22 UCHAR ReportID;
23 UCHAR CollectionNumber;
24 USHORT InputLength;
25 USHORT OutputLength;
26 USHORT FeatureLength;
27 }HIDP_REPORT_IDS, *PHIDP_REPORT_IDS;
28
29 typedef struct _HIDP_GETCOLDESC_DBG
30 {
31 ULONG BreakOffset;
32 ULONG ErrorCode;
33 ULONG Args[6];
34 }HIDP_GETCOLDESC_DBG, *PHIDP_GETCOLDESC_DBG;
35
36 typedef struct _HIDP_DEVICE_DESC
37 {
38 PHIDP_COLLECTION_DESC CollectionDesc;
39 ULONG CollectionDescLength;
40 PHIDP_REPORT_IDS ReportIDs;
41 ULONG ReportIDsLength;
42 HIDP_GETCOLDESC_DBG Dbg;
43 }HIDP_DEVICE_DESC, *PHIDP_DEVICE_DESC;
44
45 NTSTATUS
46 HidP_GetCollectionDescription(
47 IN PHIDP_REPORT_DESCRIPTOR ReportDesc,
48 IN ULONG DescLength,
49 IN POOL_TYPE PoolType,
50 OUT PHIDP_DEVICE_DESC DeviceDescription
51 );
52
53 VOID
54 HidP_FreeCollectionDescription (
55 IN PHIDP_DEVICE_DESC DeviceDescription
56 );
57
58 NTSTATUS
59 HidP_SysPowerEvent (
60 IN PCHAR HidPacket,
61 IN USHORT HidPacketLength,
62 IN PHIDP_PREPARSED_DATA Ppd,
63 OUT PULONG OutputBuffer
64 );
65
66 NTSTATUS
67 HidP_SysPowerCaps (
68 IN PHIDP_PREPARSED_DATA Ppd,
69 OUT PULONG OutputBuffer
70 );
71
72 #define HIDP_GETCOLDESC_SUCCESS 0x00
73 #define HIDP_GETCOLDESC_RESOURCES 0x01
74 #define HIDP_GETCOLDESC_BUFFER 0x02
75 #define HIDP_GETCOLDESC_LINK_RESOURCES 0x03
76 #define HIDP_GETCOLDESC_UNEXP_END_COL 0x04
77 #define HIDP_GETCOLDESC_PREPARSE_RESOURCES 0x05
78 #define HIDP_GETCOLDESC_ONE_BYTE 0x06
79 #define HIDP_GETCOLDESC_TWO_BYTE 0x07
80 #define HIDP_GETCOLDESC_FOUR_BYTE 0x08
81 #define HIDP_GETCOLDESC_BYTE_ALLIGN 0x09
82 #define HIDP_GETCOLDESC_MAIN_ITEM_NO_USAGE 0x0A
83 #define HIDP_GETCOLDESC_TOP_COLLECTION_USAGE 0x0B
84 #define HIDP_GETCOLDESC_PUSH_RESOURCES 0x10
85 #define HIDP_GETCOLDESC_ITEM_UNKNOWN 0x12
86 #define HIDP_GETCOLDESC_REPORT_ID 0x13
87 #define HIDP_GETCOLDESC_BAD_REPORT_ID 0x14
88 #define HIDP_GETCOLDESC_NO_REPORT_ID 0x15
89 #define HIDP_GETCOLDESC_DEFAULT_ID_ERROR 0x16
90 #define HIDP_GETCOLDESC_NO_DATA 0x1A
91 #define HIDP_GETCOLDESC_INVALID_MAIN_ITEM 0x1B
92 #define HIDP_GETCOLDESC_NO_CLOSE_DELIMITER 0x20
93 #define HIDP_GETCOLDESC_NOT_VALID_DELIMITER 0x21
94 #define HIDP_GETCOLDESC_MISMATCH_OC_DELIMITER 0x22
95 #define HIDP_GETCOLDESC_UNSUPPORTED 0x40
96
97 #endif