Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenusb200.h
Go to the documentation of this file.
00001 /* 00002 * usb200.h 00003 * 00004 * This file is part of the ReactOS PSDK package. 00005 * 00006 * Contributors: 00007 * Magnus Olsen. 00008 * 00009 * THIS SOFTWARE IS NOT COPYRIGHTED 00010 * 00011 * This source code is offered for use in the public domain. You may 00012 * use, modify or distribute it freely. 00013 * 00014 * This code is distributed in the hope that it will be useful but 00015 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY 00016 * DISCLAIMED. This includes but is not limited to warranties of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00018 * 00019 */ 00020 00021 #pragma once 00022 00023 /* Helper macro to enable gcc's extension. */ 00024 #ifndef __GNU_EXTENSION 00025 #ifdef __GNUC__ 00026 #define __GNU_EXTENSION __extension__ 00027 #else 00028 #define __GNU_EXTENSION 00029 #endif 00030 #endif 00031 00032 #include "usb100.h" 00033 00034 #include <pshpack1.h> 00035 00036 typedef enum _USB_DEVICE_TYPE { 00037 Usb11Device = 0, 00038 Usb20Device 00039 } USB_DEVICE_TYPE; 00040 00041 typedef enum _USB_DEVICE_SPEED { 00042 UsbLowSpeed = 0, 00043 UsbFullSpeed, 00044 UsbHighSpeed 00045 } USB_DEVICE_SPEED; 00046 00047 #define USB_PORT_STATUS_CONNECT 0x0001 00048 #define USB_PORT_STATUS_ENABLE 0x0002 00049 #define USB_PORT_STATUS_SUSPEND 0x0004 00050 #define USB_PORT_STATUS_OVER_CURRENT 0x0008 00051 #define USB_PORT_STATUS_RESET 0x0010 00052 #define USB_PORT_STATUS_POWER 0x0100 00053 #define USB_PORT_STATUS_LOW_SPEED 0x0200 00054 #define USB_PORT_STATUS_HIGH_SPEED 0x0400 00055 00056 00057 typedef union _BM_REQUEST_TYPE { 00058 struct _BM { 00059 UCHAR Recipient:2; 00060 UCHAR Reserved:3; 00061 UCHAR Type:2; 00062 UCHAR Dir:1; 00063 } _BM; 00064 UCHAR B; 00065 } BM_REQUEST_TYPE, *PBM_REQUEST_TYPE; 00066 00067 typedef struct _USB_DEFAULT_PIPE_SETUP_PACKET { 00068 BM_REQUEST_TYPE bmRequestType; 00069 UCHAR bRequest; 00070 union _wValue { 00071 __GNU_EXTENSION struct { 00072 UCHAR LowByte; 00073 UCHAR HiByte; 00074 }; 00075 USHORT W; 00076 } wValue; 00077 union _wIndex { 00078 __GNU_EXTENSION struct { 00079 UCHAR LowByte; 00080 UCHAR HiByte; 00081 }; 00082 USHORT W; 00083 } wIndex; 00084 USHORT wLength; 00085 } USB_DEFAULT_PIPE_SETUP_PACKET, *PUSB_DEFAULT_PIPE_SETUP_PACKET; 00086 00087 C_ASSERT(sizeof(USB_DEFAULT_PIPE_SETUP_PACKET) == 8); 00088 00089 #define USB_DEVICE_QUALIFIER_DESCRIPTOR_TYPE 0x06 00090 #define USB_OTHER_SPEED_CONFIGURATION_DESCRIPTOR_TYPE 0x07 00091 00092 typedef struct _USB_DEVICE_QUALIFIER_DESCRIPTOR { 00093 UCHAR bLength; 00094 UCHAR bDescriptorType; 00095 USHORT bcdUSB; 00096 UCHAR bDeviceClass; 00097 UCHAR bDeviceSubClass; 00098 UCHAR bDeviceProtocol; 00099 UCHAR bMaxPacketSize0; 00100 UCHAR bNumConfigurations; 00101 UCHAR bReserved; 00102 } USB_DEVICE_QUALIFIER_DESCRIPTOR, *PUSB_DEVICE_QUALIFIER_DESCRIPTOR; 00103 00104 typedef union _USB_HIGH_SPEED_MAXPACKET { 00105 struct _MP { 00106 USHORT MaxPacket:11; 00107 USHORT HSmux:2; 00108 USHORT Reserved:3; 00109 } _MP; 00110 USHORT us; 00111 } USB_HIGH_SPEED_MAXPACKET, *PUSB_HIGH_SPEED_MAXPACKET; 00112 00113 #define USB_INTERFACE_ASSOCIATION_DESCRIPTOR_TYPE 0x0B 00114 00115 typedef struct _USB_INTERFACE_ASSOCIATION_DESCRIPTOR { 00116 UCHAR bLength; 00117 UCHAR bDescriptorType; 00118 UCHAR bFirstInterface; 00119 UCHAR bInterfaceCount; 00120 UCHAR bFunctionClass; 00121 UCHAR bFunctionSubClass; 00122 UCHAR bFunctionProtocol; 00123 UCHAR iFunction; 00124 } USB_INTERFACE_ASSOCIATION_DESCRIPTOR, *PUSB_INTERFACE_ASSOCIATION_DESCRIPTOR; 00125 00126 #include <poppack.h> Generated on Fri May 25 2012 04:31:00 for ReactOS by
1.7.6.1
|