Merge from amd64-branch:
[reactos.git] / reactos / include / ddk / usb200.h
1 #ifndef __USB200_H__
2 #define __USB200_H__
3
4 #include "usb100.h"
5
6 #include <pshpack1.h>
7
8
9 typedef enum _USB_DEVICE_TYPE
10 {
11 Usb11Device = 0,
12 Usb20Device
13 } USB_DEVICE_TYPE;
14
15 typedef enum _USB_DEVICE_SPEED
16 {
17 UsbLowSpeed = 0,
18 UsbFullSpeed,
19 UsbHighSpeed
20 } USB_DEVICE_SPEED;
21
22 typedef union _BM_REQUEST_TYPE
23 {
24 struct _BM
25 {
26 UCHAR Recipient:2;
27 UCHAR Reserved:3;
28 UCHAR Type:2;
29 UCHAR Dir:1;
30 } _BM;
31 UCHAR B;
32 } BM_REQUEST_TYPE, *PBM_REQUEST_TYPE;
33
34 typedef struct _USB_DEFAULT_PIPE_SETUP_PACKET
35 {
36 BM_REQUEST_TYPE bmRequestType;
37 UCHAR bRequest;
38 union _wValue
39 {
40 struct
41 {
42 UCHAR LowByte;
43 UCHAR HiByte;
44 };
45 USHORT W;
46 } wValue;
47 union _wIndex
48 {
49 struct
50 {
51 UCHAR LowByte;
52 UCHAR HiByte;
53 };
54 USHORT W;
55 } wIndex;
56 USHORT wLength;
57 } USB_DEFAULT_PIPE_SETUP_PACKET, *PUSB_DEFAULT_PIPE_SETUP_PACKET;
58
59
60 C_ASSERT(sizeof(USB_DEFAULT_PIPE_SETUP_PACKET) == 8);
61
62 typedef struct _USB_DEVICE_QUALIFIER_DESCRIPTOR
63 {
64 UCHAR bLength;
65 UCHAR bDescriptorType;
66 USHORT bcdUSB;
67 UCHAR bDeviceClass;
68 UCHAR bDeviceSubClass;
69 UCHAR bDeviceProtocol;
70 UCHAR bMaxPacketSize0;
71 UCHAR bNumConfigurations;
72 UCHAR bReserved;
73 } USB_DEVICE_QUALIFIER_DESCRIPTOR, *PUSB_DEVICE_QUALIFIER_DESCRIPTOR;
74
75
76 typedef union _USB_HIGH_SPEED_MAXPACKET
77 {
78 struct _MP
79 {
80 USHORT MaxPacket:11;
81 USHORT HSmux:2;
82 USHORT Reserved:3;
83 } _MP;
84 USHORT us;
85 } USB_HIGH_SPEED_MAXPACKET, *PUSB_HIGH_SPEED_MAXPACKET;
86
87 typedef struct _USB_INTERFACE_ASSOCIATION_DESCRIPTOR
88 {
89 UCHAR bLength;
90 UCHAR bDescriptorType;
91 UCHAR bFirstInterface;
92 UCHAR bInterfaceCount;
93 UCHAR bFunctionClass;
94 UCHAR bFunctionSubClass;
95 UCHAR bFunctionProtocol;
96 UCHAR iFunction;
97 } USB_INTERFACE_ASSOCIATION_DESCRIPTOR, *PUSB_INTERFACE_ASSOCIATION_DESCRIPTOR;
98
99 #define USB_PORT_STATUS_CONNECT 0x0001
100 #define USB_PORT_STATUS_ENABLE 0x0002
101 #define USB_PORT_STATUS_SUSPEND 0x0004
102 #define USB_PORT_STATUS_OVER_CURRENT 0x0008
103 #define USB_PORT_STATUS_RESET 0x0010
104 #define USB_PORT_STATUS_POWER 0x0100
105 #define USB_PORT_STATUS_LOW_SPEED 0x0200
106 #define USB_PORT_STATUS_HIGH_SPEED 0x0400
107 #define USB_DEVICE_QUALIFIER_DESCRIPTOR_TYPE 0x06
108 #define USB_INTERFACE_ASSOCIATION_DESCRIPTOR_TYPE 0x0B
109
110 #include <poppack.h>
111
112 #endif //__USB200_H__