More work on USB related definitions

svn path=/branches/header-work/; revision=45849
This commit is contained in:
Amine Khaldi 2010-03-05 00:08:17 +00:00
parent 19adca9597
commit 1ff2c4916b

View file

@ -20,13 +20,14 @@
* *
*/ */
#ifndef __USB100_H #pragma once
#define __USB100_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <pshpack1.h>
#define MAXIMUM_USB_STRING_LENGTH 255 #define MAXIMUM_USB_STRING_LENGTH 255
#define USB_DEVICE_CLASS_RESERVED 0x00 #define USB_DEVICE_CLASS_RESERVED 0x00
@ -92,7 +93,6 @@ typedef struct _USB_COMMON_DESCRIPTOR {
#define USB_CONFIG_SELF_POWERED 0x40 #define USB_CONFIG_SELF_POWERED 0x40
#define USB_CONFIG_REMOTE_WAKEUP 0x20 #define USB_CONFIG_REMOTE_WAKEUP 0x20
#include <pshpack1.h>
typedef struct _USB_CONFIGURATION_DESCRIPTOR { typedef struct _USB_CONFIGURATION_DESCRIPTOR {
UCHAR bLength; UCHAR bLength;
UCHAR bDescriptorType; UCHAR bDescriptorType;
@ -103,7 +103,6 @@ typedef struct _USB_CONFIGURATION_DESCRIPTOR {
UCHAR bmAttributes; UCHAR bmAttributes;
UCHAR MaxPower; UCHAR MaxPower;
} USB_CONFIGURATION_DESCRIPTOR, *PUSB_CONFIGURATION_DESCRIPTOR; } USB_CONFIGURATION_DESCRIPTOR, *PUSB_CONFIGURATION_DESCRIPTOR;
#include <poppack.h>
typedef struct _USB_DEVICE_DESCRIPTOR { typedef struct _USB_DEVICE_DESCRIPTOR {
UCHAR bLength; UCHAR bLength;
@ -134,7 +133,6 @@ typedef struct _USB_DEVICE_DESCRIPTOR {
#define USB_ENDPOINT_TYPE_BULK 0x02 #define USB_ENDPOINT_TYPE_BULK 0x02
#define USB_ENDPOINT_TYPE_INTERRUPT 0x03 #define USB_ENDPOINT_TYPE_INTERRUPT 0x03
#include <pshpack1.h>
typedef struct _USB_ENDPOINT_DESCRIPTOR { typedef struct _USB_ENDPOINT_DESCRIPTOR {
UCHAR bLength; UCHAR bLength;
UCHAR bDescriptorType; UCHAR bDescriptorType;
@ -143,7 +141,6 @@ typedef struct _USB_ENDPOINT_DESCRIPTOR {
USHORT wMaxPacketSize; USHORT wMaxPacketSize;
UCHAR bInterval; UCHAR bInterval;
} USB_ENDPOINT_DESCRIPTOR, *PUSB_ENDPOINT_DESCRIPTOR; } USB_ENDPOINT_DESCRIPTOR, *PUSB_ENDPOINT_DESCRIPTOR;
#include <poppack.h>
#define USB_FEATURE_ENDPOINT_STALL 0x0000 #define USB_FEATURE_ENDPOINT_STALL 0x0000
#define USB_FEATURE_REMOTE_WAKEUP 0x0001 #define USB_FEATURE_REMOTE_WAKEUP 0x0001
@ -166,7 +163,6 @@ typedef struct _USB_STRING_DESCRIPTOR {
WCHAR bString[1]; WCHAR bString[1];
} USB_STRING_DESCRIPTOR, *PUSB_STRING_DESCRIPTOR; } USB_STRING_DESCRIPTOR, *PUSB_STRING_DESCRIPTOR;
#include <pshpack1.h>
typedef struct _USB_HUB_DESCRIPTOR { typedef struct _USB_HUB_DESCRIPTOR {
UCHAR bDescriptorLength; UCHAR bDescriptorLength;
UCHAR bDescriptorType; UCHAR bDescriptorType;
@ -176,7 +172,6 @@ typedef struct _USB_HUB_DESCRIPTOR {
UCHAR bHubControlCurrent; UCHAR bHubControlCurrent;
UCHAR bRemoveAndPowerMask[64]; UCHAR bRemoveAndPowerMask[64];
} USB_HUB_DESCRIPTOR, *PUSB_HUB_DESCRIPTOR; } USB_HUB_DESCRIPTOR, *PUSB_HUB_DESCRIPTOR;
#include <poppack.h>
#define USB_SUPPORT_D0_COMMAND 0x01 #define USB_SUPPORT_D0_COMMAND 0x01
#define USB_SUPPORT_D1_COMMAND 0x02 #define USB_SUPPORT_D1_COMMAND 0x02
@ -207,7 +202,6 @@ typedef struct _USB_CONFIGURATION_POWER_DESCRIPTOR {
#define USB_FEATURE_INTERFACE_POWER_D2 0x0004 #define USB_FEATURE_INTERFACE_POWER_D2 0x0004
#define USB_FEATURE_INTERFACE_POWER_D3 0x0005 #define USB_FEATURE_INTERFACE_POWER_D3 0x0005
#include <pshpack1.h>
typedef struct _USB_INTERFACE_POWER_DESCRIPTOR { typedef struct _USB_INTERFACE_POWER_DESCRIPTOR {
UCHAR bLength; UCHAR bLength;
UCHAR bDescriptorType; UCHAR bDescriptorType;
@ -222,10 +216,9 @@ typedef struct _USB_INTERFACE_POWER_DESCRIPTOR {
USHORT TransitionTimeFromD2; USHORT TransitionTimeFromD2;
USHORT TransitionTimeFromD3; USHORT TransitionTimeFromD3;
} USB_INTERFACE_POWER_DESCRIPTOR, *PUSB_INTERFACE_POWER_DESCRIPTOR; } USB_INTERFACE_POWER_DESCRIPTOR, *PUSB_INTERFACE_POWER_DESCRIPTOR;
#include <poppack.h> #include <poppack.h>
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* __USB100_H */