2 * Copyright (C) the Wine project
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __DDK_USB100_H__
20 #define __DDK_USB100_H__
22 #define USB_DEVICE_DESCRIPTOR_TYPE 0x01
23 #define USB_CONFIGURATION_DESCRIPTOR_TYPE 0x02
24 #define USB_STRING_DESCRIPTOR_TYPE 0x03
25 #define USB_INTERFACE_DESCRIPTOR_TYPE 0x04
26 #define USB_ENDPOINT_DESCRIPTOR_TYPE 0x05
27 #define USB_RESERVED_DESCRIPTOR_TYPE 0x06
28 #define USB_CONFIG_POWER_DESCRIPTOR_TYPE 0x07
29 #define USB_INTERFACE_POWER_DESCRIPTOR_TYPE 0x08
33 typedef struct _USB_DEVICE_DESCRIPTOR
{
35 UCHAR bDescriptorType
;
38 UCHAR bDeviceSubClass
;
39 UCHAR bDeviceProtocol
;
40 UCHAR bMaxPacketSize0
;
47 UCHAR bNumConfigurations
;
48 } USB_DEVICE_DESCRIPTOR
;
49 typedef struct _USB_DEVICE_DESCRIPTOR
*PUSB_DEVICE_DESCRIPTOR
;
51 #define USB_ENDPOINT_TYPE_MASK 0x03
52 #define USB_ENDPOINT_TYPE_CONTROL 0x00
53 #define USB_ENDPOINT_TYPE_ISOCHRONOUS 0x01
54 #define USB_ENDPOINT_TYPE_BULK 0x02
55 #define USB_ENDPOINT_TYPE_INTERRUPT 0x03
57 typedef struct _USB_ENDPOINT_DESCRIPTOR
{
59 UCHAR bDescriptorType
;
60 UCHAR bEndpointAddress
;
62 USHORT wMaxPacketSize
;
64 } USB_ENDPOINT_DESCRIPTOR
;
65 typedef struct _USB_ENDPOINT_DESCRIPTOR
*PUSB_ENDPOINT_DESCRIPTOR
;
67 typedef struct _USB_CONFIGURATION_DESCRIPTOR
{
69 UCHAR bDescriptorType
;
72 UCHAR bConfigurationValue
;
76 } USB_CONFIGURATION_DESCRIPTOR
;
77 typedef struct _USB_CONFIGURATION_DESCRIPTOR
*PUSB_CONFIGURATION_DESCRIPTOR
;
79 typedef struct _USB_INTERFACE_DESCRIPTOR
{
81 UCHAR bDescriptorType
;
82 UCHAR bInterfaceNumber
;
83 UCHAR bAlternateSetting
;
85 UCHAR bInterfaceClass
;
86 UCHAR bInterfaceSubClass
;
87 UCHAR bInterfaceProtocol
;
89 } USB_INTERFACE_DESCRIPTOR
;
90 typedef struct _USB_INTERFACE_DESCRIPTOR
*PUSB_INTERFACE_DESCRIPTOR
;
92 typedef struct _USB_STRING_DESCRIPTOR
{
94 UCHAR bDescriptorType
;
96 } USB_STRING_DESCRIPTOR
;
97 typedef struct _USB_STRING_DESCRIPTOR
*PUSB_STRING_DESCRIPTOR
;
99 typedef struct _USB_COMMON_DESCRIPTOR
{
101 UCHAR bDescriptorType
;
102 } USB_COMMON_DESCRIPTOR
;
103 typedef struct _USB_COMMON_DESCRIPTOR
*PUSB_COMMON_DESCRIPTOR
;