31#define BMREQUEST_HOST_TO_DEVICE 0
32#define BMREQUEST_DEVICE_TO_HOST 1
34#define BMREQUEST_STANDARD 0
35#define BMREQUEST_CLASS 1
36#define BMREQUEST_VENDOR 2
38#define BMREQUEST_TO_DEVICE 0
39#define BMREQUEST_TO_INTERFACE 1
40#define BMREQUEST_TO_ENDPOINT 2
41#define BMREQUEST_TO_OTHER 3
43#define MAXIMUM_USB_STRING_LENGTH 255
45#define USB_GETSTATUS_SELF_POWERED 0x01
46#define USB_GETSTATUS_REMOTE_WAKEUP_ENABLED 0x02
49#define USB_DEVICE_DESCRIPTOR_TYPE 0x01
50#define USB_CONFIGURATION_DESCRIPTOR_TYPE 0x02
51#define USB_STRING_DESCRIPTOR_TYPE 0x03
52#define USB_INTERFACE_DESCRIPTOR_TYPE 0x04
53#define USB_ENDPOINT_DESCRIPTOR_TYPE 0x05
54#define USB_RESERVED_DESCRIPTOR_TYPE 0x06
55#define USB_CONFIG_POWER_DESCRIPTOR_TYPE 0x07
56#define USB_INTERFACE_POWER_DESCRIPTOR_TYPE 0x08
58#define USB_DESCRIPTOR_MAKE_TYPE_AND_INDEX(d, i) ((USHORT)((USHORT)d << 8 | i))
61#define USB_ENDPOINT_TYPE_MASK 0x03
62#define USB_ENDPOINT_TYPE_CONTROL 0x00
63#define USB_ENDPOINT_TYPE_ISOCHRONOUS 0x01
64#define USB_ENDPOINT_TYPE_BULK 0x02
65#define USB_ENDPOINT_TYPE_INTERRUPT 0x03
68#define USB_CONFIG_POWERED_MASK 0xc0
69#define USB_CONFIG_BUS_POWERED 0x80
70#define USB_CONFIG_SELF_POWERED 0x40
71#define USB_CONFIG_REMOTE_WAKEUP 0x20
73#define USB_ENDPOINT_DIRECTION_MASK 0x80
75#define USB_ENDPOINT_DIRECTION_OUT(x) (!((x) & USB_ENDPOINT_DIRECTION_MASK))
76#define USB_ENDPOINT_DIRECTION_IN(x) ((x) & USB_ENDPOINT_DIRECTION_MASK)
78#define USB_REQUEST_GET_STATUS 0x00
79#define USB_REQUEST_CLEAR_FEATURE 0x01
80#define USB_REQUEST_SET_FEATURE 0x03
81#define USB_REQUEST_SET_ADDRESS 0x05
82#define USB_REQUEST_GET_DESCRIPTOR 0x06
83#define USB_REQUEST_SET_DESCRIPTOR 0x07
84#define USB_REQUEST_GET_CONFIGURATION 0x08
85#define USB_REQUEST_SET_CONFIGURATION 0x09
86#define USB_REQUEST_GET_INTERFACE 0x0A
87#define USB_REQUEST_SET_INTERFACE 0x0B
88#define USB_REQUEST_SYNC_FRAME 0x0C
90#define USB_DEVICE_CLASS_RESERVED 0x00
91#define USB_DEVICE_CLASS_AUDIO 0x01
92#define USB_DEVICE_CLASS_COMMUNICATIONS 0x02
93#define USB_DEVICE_CLASS_HUMAN_INTERFACE 0x03
94#define USB_DEVICE_CLASS_MONITOR 0x04
95#define USB_DEVICE_CLASS_PHYSICAL_INTERFACE 0x05
96#define USB_DEVICE_CLASS_POWER 0x06
97#define USB_DEVICE_CLASS_PRINTER 0x07
98#define USB_DEVICE_CLASS_STORAGE 0x08
99#define USB_DEVICE_CLASS_HUB 0x09
100#define USB_DEVICE_CLASS_VENDOR_SPECIFIC 0xFF
102#define USB_FEATURE_ENDPOINT_STALL 0x0000
103#define USB_FEATURE_REMOTE_WAKEUP 0x0001
105#define USB_FEATURE_INTERFACE_POWER_D0 0x0002
106#define USB_FEATURE_INTERFACE_POWER_D1 0x0003
107#define USB_FEATURE_INTERFACE_POWER_D2 0x0004
108#define USB_FEATURE_INTERFACE_POWER_D3 0x0005
180#define USB_SUPPORT_D0_COMMAND 0x01
181#define USB_SUPPORT_D1_COMMAND 0x02
182#define USB_SUPPORT_D2_COMMAND 0x04
183#define USB_SUPPORT_D3_COMMAND 0x08
185#define USB_SUPPORT_D1_WAKEUP 0x10
186#define USB_SUPPORT_D2_WAKEUP 0x20
UCHAR bConfigurationValue
USHORT TransitionTimeFromD3
UCHAR SelfPowerConsumedD0[3]
USHORT TransitionTimeFromD2
USHORT TransitionTimeFromD1
USHORT wHubCharacteristics
UCHAR bRemoveAndPowerMask[64]
UCHAR bPowerOnToPowerGood
UCHAR bmCapabilitiesFlags
USHORT TransitionTimeFromD1
USHORT TransitionTimeFromD2
USHORT TransitionTimeFromD3
struct _USB_CONFIGURATION_DESCRIPTOR USB_CONFIGURATION_DESCRIPTOR
struct _USB_CONFIGURATION_DESCRIPTOR * PUSB_CONFIGURATION_DESCRIPTOR
struct _USB_STRING_DESCRIPTOR * PUSB_STRING_DESCRIPTOR
struct _USB_CONFIGURATION_POWER_DESCRIPTOR USB_CONFIGURATION_POWER_DESCRIPTOR
struct _USB_INTERFACE_POWER_DESCRIPTOR USB_INTERFACE_POWER_DESCRIPTOR
struct _USB_INTERFACE_DESCRIPTOR * PUSB_INTERFACE_DESCRIPTOR
struct _USB_CONFIGURATION_POWER_DESCRIPTOR * PUSB_CONFIGURATION_POWER_DESCRIPTOR
struct _USB_ENDPOINT_DESCRIPTOR USB_ENDPOINT_DESCRIPTOR
struct _USB_HUB_DESCRIPTOR USB_HUB_DESCRIPTOR
struct _USB_DEVICE_DESCRIPTOR USB_DEVICE_DESCRIPTOR
struct _USB_INTERFACE_POWER_DESCRIPTOR * PUSB_INTERFACE_POWER_DESCRIPTOR
struct _USB_DEVICE_DESCRIPTOR * PUSB_DEVICE_DESCRIPTOR
struct _USB_COMMON_DESCRIPTOR * PUSB_COMMON_DESCRIPTOR
struct _USB_STRING_DESCRIPTOR USB_STRING_DESCRIPTOR
struct _USB_ENDPOINT_DESCRIPTOR * PUSB_ENDPOINT_DESCRIPTOR
struct _USB_HUB_DESCRIPTOR * PUSB_HUB_DESCRIPTOR
struct _USB_INTERFACE_DESCRIPTOR USB_INTERFACE_DESCRIPTOR
struct _USB_COMMON_DESCRIPTOR USB_COMMON_DESCRIPTOR