Author: akhaldi
Date: Fri Mar 5 01:15:36 2010
New Revision: 45850
URL:
http://svn.reactos.org/svn/reactos?rev=45850&view=rev
Log:
More work on USB related definitions
Added:
branches/header-work/include/psdk/usb200.h
- copied, changed from r45846, branches/header-work/include/ddk/usb200.h
Removed:
branches/header-work/include/ddk/usb200.h
Removed: branches/header-work/include/ddk/usb200.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/usb200.…
==============================================================================
--- branches/header-work/include/ddk/usb200.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/usb200.h (removed)
@@ -1,121 +1,0 @@
-#ifndef __USB200_H__
-#define __USB200_H__
-
-/* Helper macro to enable gcc's extension. */
-#ifndef __GNU_EXTENSION
-#ifdef __GNUC__
-#define __GNU_EXTENSION __extension__
-#else
-#define __GNU_EXTENSION
-#endif
-#endif
-
-#include "usb100.h"
-
-#include <pshpack1.h>
-
-
-typedef enum _USB_DEVICE_TYPE
-{
- Usb11Device = 0,
- Usb20Device
-} USB_DEVICE_TYPE;
-
-typedef enum _USB_DEVICE_SPEED
-{
- UsbLowSpeed = 0,
- UsbFullSpeed,
- UsbHighSpeed
-} USB_DEVICE_SPEED;
-
-typedef union _BM_REQUEST_TYPE
-{
- struct _BM
- {
- UCHAR Recipient:2;
- UCHAR Reserved:3;
- UCHAR Type:2;
- UCHAR Dir:1;
- } _BM;
- UCHAR B;
-} BM_REQUEST_TYPE, *PBM_REQUEST_TYPE;
-
-typedef struct _USB_DEFAULT_PIPE_SETUP_PACKET
-{
- BM_REQUEST_TYPE bmRequestType;
- UCHAR bRequest;
- union _wValue
- {
- __GNU_EXTENSION struct
- {
- UCHAR LowByte;
- UCHAR HiByte;
- };
- USHORT W;
- } wValue;
- union _wIndex
- {
- __GNU_EXTENSION struct
- {
- UCHAR LowByte;
- UCHAR HiByte;
- };
- USHORT W;
- } wIndex;
- USHORT wLength;
-} USB_DEFAULT_PIPE_SETUP_PACKET, *PUSB_DEFAULT_PIPE_SETUP_PACKET;
-
-
-C_ASSERT(sizeof(USB_DEFAULT_PIPE_SETUP_PACKET) == 8);
-
-typedef struct _USB_DEVICE_QUALIFIER_DESCRIPTOR
-{
- UCHAR bLength;
- UCHAR bDescriptorType;
- USHORT bcdUSB;
- UCHAR bDeviceClass;
- UCHAR bDeviceSubClass;
- UCHAR bDeviceProtocol;
- UCHAR bMaxPacketSize0;
- UCHAR bNumConfigurations;
- UCHAR bReserved;
-} USB_DEVICE_QUALIFIER_DESCRIPTOR, *PUSB_DEVICE_QUALIFIER_DESCRIPTOR;
-
-
-typedef union _USB_HIGH_SPEED_MAXPACKET
-{
- struct _MP
- {
- USHORT MaxPacket:11;
- USHORT HSmux:2;
- USHORT Reserved:3;
- } _MP;
- USHORT us;
-} USB_HIGH_SPEED_MAXPACKET, *PUSB_HIGH_SPEED_MAXPACKET;
-
-typedef struct _USB_INTERFACE_ASSOCIATION_DESCRIPTOR
-{
- UCHAR bLength;
- UCHAR bDescriptorType;
- UCHAR bFirstInterface;
- UCHAR bInterfaceCount;
- UCHAR bFunctionClass;
- UCHAR bFunctionSubClass;
- UCHAR bFunctionProtocol;
- UCHAR iFunction;
-} USB_INTERFACE_ASSOCIATION_DESCRIPTOR, *PUSB_INTERFACE_ASSOCIATION_DESCRIPTOR;
-
-#define USB_PORT_STATUS_CONNECT 0x0001
-#define USB_PORT_STATUS_ENABLE 0x0002
-#define USB_PORT_STATUS_SUSPEND 0x0004
-#define USB_PORT_STATUS_OVER_CURRENT 0x0008
-#define USB_PORT_STATUS_RESET 0x0010
-#define USB_PORT_STATUS_POWER 0x0100
-#define USB_PORT_STATUS_LOW_SPEED 0x0200
-#define USB_PORT_STATUS_HIGH_SPEED 0x0400
-#define USB_DEVICE_QUALIFIER_DESCRIPTOR_TYPE 0x06
-#define USB_INTERFACE_ASSOCIATION_DESCRIPTOR_TYPE 0x0B
-
-#include <poppack.h>
-
-#endif //__USB200_H__
Copied: branches/header-work/include/psdk/usb200.h (from r45846,
branches/header-work/include/ddk/usb200.h)
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/usb200…
==============================================================================
--- branches/header-work/include/ddk/usb200.h [iso-8859-1] (original)
+++ branches/header-work/include/psdk/usb200.h [iso-8859-1] Fri Mar 5 01:15:36 2010
@@ -1,5 +1,4 @@
-#ifndef __USB200_H__
-#define __USB200_H__
+#pragma once
/* Helper macro to enable gcc's extension. */
#ifndef __GNU_EXTENSION
@@ -14,49 +13,39 @@
#include <pshpack1.h>
-
-typedef enum _USB_DEVICE_TYPE
-{
+typedef enum _USB_DEVICE_TYPE {
Usb11Device = 0,
Usb20Device
} USB_DEVICE_TYPE;
-typedef enum _USB_DEVICE_SPEED
-{
+typedef enum _USB_DEVICE_SPEED {
UsbLowSpeed = 0,
UsbFullSpeed,
UsbHighSpeed
} USB_DEVICE_SPEED;
-typedef union _BM_REQUEST_TYPE
-{
- struct _BM
- {
- UCHAR Recipient:2;
- UCHAR Reserved:3;
- UCHAR Type:2;
- UCHAR Dir:1;
+typedef union _BM_REQUEST_TYPE {
+ struct _BM {
+ UCHAR Recipient:2;
+ UCHAR Reserved:3;
+ UCHAR Type:2;
+ UCHAR Dir:1;
} _BM;
UCHAR B;
} BM_REQUEST_TYPE, *PBM_REQUEST_TYPE;
-typedef struct _USB_DEFAULT_PIPE_SETUP_PACKET
-{
+typedef struct _USB_DEFAULT_PIPE_SETUP_PACKET {
BM_REQUEST_TYPE bmRequestType;
UCHAR bRequest;
- union _wValue
- {
- __GNU_EXTENSION struct
- {
+ union _wValue {
+ __GNU_EXTENSION struct {
UCHAR LowByte;
UCHAR HiByte;
};
USHORT W;
} wValue;
- union _wIndex
- {
- __GNU_EXTENSION struct
- {
+ union _wIndex {
+ __GNU_EXTENSION struct {
UCHAR LowByte;
UCHAR HiByte;
};
@@ -65,11 +54,9 @@
USHORT wLength;
} USB_DEFAULT_PIPE_SETUP_PACKET, *PUSB_DEFAULT_PIPE_SETUP_PACKET;
-
C_ASSERT(sizeof(USB_DEFAULT_PIPE_SETUP_PACKET) == 8);
-typedef struct _USB_DEVICE_QUALIFIER_DESCRIPTOR
-{
+typedef struct _USB_DEVICE_QUALIFIER_DESCRIPTOR {
UCHAR bLength;
UCHAR bDescriptorType;
USHORT bcdUSB;
@@ -81,11 +68,8 @@
UCHAR bReserved;
} USB_DEVICE_QUALIFIER_DESCRIPTOR, *PUSB_DEVICE_QUALIFIER_DESCRIPTOR;
-
-typedef union _USB_HIGH_SPEED_MAXPACKET
-{
- struct _MP
- {
+typedef union _USB_HIGH_SPEED_MAXPACKET {
+ struct _MP {
USHORT MaxPacket:11;
USHORT HSmux:2;
USHORT Reserved:3;
@@ -93,29 +77,27 @@
USHORT us;
} USB_HIGH_SPEED_MAXPACKET, *PUSB_HIGH_SPEED_MAXPACKET;
-typedef struct _USB_INTERFACE_ASSOCIATION_DESCRIPTOR
-{
- UCHAR bLength;
- UCHAR bDescriptorType;
- UCHAR bFirstInterface;
- UCHAR bInterfaceCount;
- UCHAR bFunctionClass;
- UCHAR bFunctionSubClass;
- UCHAR bFunctionProtocol;
- UCHAR iFunction;
+typedef struct _USB_INTERFACE_ASSOCIATION_DESCRIPTOR {
+ UCHAR bLength;
+ UCHAR bDescriptorType;
+ UCHAR bFirstInterface;
+ UCHAR bInterfaceCount;
+ UCHAR bFunctionClass;
+ UCHAR bFunctionSubClass;
+ UCHAR bFunctionProtocol;
+ UCHAR iFunction;
} USB_INTERFACE_ASSOCIATION_DESCRIPTOR, *PUSB_INTERFACE_ASSOCIATION_DESCRIPTOR;
-#define USB_PORT_STATUS_CONNECT 0x0001
-#define USB_PORT_STATUS_ENABLE 0x0002
-#define USB_PORT_STATUS_SUSPEND 0x0004
-#define USB_PORT_STATUS_OVER_CURRENT 0x0008
-#define USB_PORT_STATUS_RESET 0x0010
-#define USB_PORT_STATUS_POWER 0x0100
-#define USB_PORT_STATUS_LOW_SPEED 0x0200
-#define USB_PORT_STATUS_HIGH_SPEED 0x0400
-#define USB_DEVICE_QUALIFIER_DESCRIPTOR_TYPE 0x06
-#define USB_INTERFACE_ASSOCIATION_DESCRIPTOR_TYPE 0x0B
+#define USB_PORT_STATUS_CONNECT 0x0001
+#define USB_PORT_STATUS_ENABLE 0x0002
+#define USB_PORT_STATUS_SUSPEND 0x0004
+#define USB_PORT_STATUS_OVER_CURRENT 0x0008
+#define USB_PORT_STATUS_RESET 0x0010
+#define USB_PORT_STATUS_POWER 0x0100
+#define USB_PORT_STATUS_LOW_SPEED 0x0200
+#define USB_PORT_STATUS_HIGH_SPEED 0x0400
+#define USB_DEVICE_QUALIFIER_DESCRIPTOR_TYPE 0x06
+#define USB_OTHER_SPEED_CONFIGURATION_DESCRIPTOR_TYPE 0x07
+#define USB_INTERFACE_ASSOCIATION_DESCRIPTOR_TYPE 0x0B
#include <poppack.h>
-
-#endif //__USB200_H__