More work on USB related definitions
[reactos.git] / include / psdk / usb100.h
similarity index 71%
rename from include/ddk/usb100.h
rename to include/psdk/usb100.h
index 16a474a..1201ac1 100644 (file)
  *
  */
 
-#ifndef __USB100_H
-#define __USB100_H
+#pragma once
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+#include <pshpack1.h>
+
 #define MAXIMUM_USB_STRING_LENGTH         255
 
 #define USB_DEVICE_CLASS_RESERVED           0x00
@@ -80,8 +81,8 @@ extern "C" {
 #define USB_ENDPOINT_DESCRIPTOR_TYPE      0x05
 
 typedef struct _USB_COMMON_DESCRIPTOR {
-       UCHAR  bLength;
-       UCHAR  bDescriptorType;
+  UCHAR bLength;
+  UCHAR bDescriptorType;
 } USB_COMMON_DESCRIPTOR, *PUSB_COMMON_DESCRIPTOR;
 
 #define USB_DESCRIPTOR_MAKE_TYPE_AND_INDEX(d, i) ((USHORT)((USHORT)d << 8 | i))
@@ -92,34 +93,32 @@ typedef struct _USB_COMMON_DESCRIPTOR {
 #define USB_CONFIG_SELF_POWERED           0x40
 #define USB_CONFIG_REMOTE_WAKEUP          0x20
 
-#include <pshpack1.h>
 typedef struct _USB_CONFIGURATION_DESCRIPTOR {
-  UCHAR  bLength;
-  UCHAR  bDescriptorType;
-  USHORT  wTotalLength;
-  UCHAR  bNumInterfaces;
-  UCHAR  bConfigurationValue;
-  UCHAR  iConfiguration;
-  UCHAR  bmAttributes;
-  UCHAR  MaxPower;
+  UCHAR bLength;
+  UCHAR bDescriptorType;
+  USHORT wTotalLength;
+  UCHAR bNumInterfaces;
+  UCHAR bConfigurationValue;
+  UCHAR iConfiguration;
+  UCHAR bmAttributes;
+  UCHAR MaxPower;
 } USB_CONFIGURATION_DESCRIPTOR, *PUSB_CONFIGURATION_DESCRIPTOR;
-#include <poppack.h>
 
 typedef struct _USB_DEVICE_DESCRIPTOR {
-  UCHAR  bLength;
-  UCHAR  bDescriptorType;
-  USHORT  bcdUSB;
-  UCHAR  bDeviceClass;
-  UCHAR  bDeviceSubClass;
-  UCHAR  bDeviceProtocol;
-  UCHAR  bMaxPacketSize0;
-  USHORT  idVendor;
-  USHORT  idProduct;
-  USHORT  bcdDevice;
-  UCHAR  iManufacturer;
-  UCHAR  iProduct;
-  UCHAR  iSerialNumber;
-  UCHAR  bNumConfigurations;
+  UCHAR bLength;
+  UCHAR bDescriptorType;
+  USHORT bcdUSB;
+  UCHAR bDeviceClass;
+  UCHAR bDeviceSubClass;
+  UCHAR bDeviceProtocol;
+  UCHAR bMaxPacketSize0;
+  USHORT idVendor;
+  USHORT idProduct;
+  USHORT bcdDevice;
+  UCHAR iManufacturer;
+  UCHAR iProduct;
+  UCHAR iSerialNumber;
+  UCHAR bNumConfigurations;
 } USB_DEVICE_DESCRIPTOR, *PUSB_DEVICE_DESCRIPTOR;
 
 #define USB_ENDPOINT_DIRECTION_MASK       0x80
@@ -134,49 +133,45 @@ typedef struct _USB_DEVICE_DESCRIPTOR {
 #define USB_ENDPOINT_TYPE_BULK            0x02
 #define USB_ENDPOINT_TYPE_INTERRUPT       0x03
 
-#include <pshpack1.h>
 typedef struct _USB_ENDPOINT_DESCRIPTOR {
-  UCHAR  bLength;
-  UCHAR  bDescriptorType;
-  UCHAR  bEndpointAddress;
-  UCHAR  bmAttributes;
-  USHORT  wMaxPacketSize;
-  UCHAR  bInterval;
+  UCHAR bLength;
+  UCHAR bDescriptorType;
+  UCHAR bEndpointAddress;
+  UCHAR bmAttributes;
+  USHORT wMaxPacketSize;
+  UCHAR bInterval;
 } USB_ENDPOINT_DESCRIPTOR, *PUSB_ENDPOINT_DESCRIPTOR;
-#include <poppack.h>
 
 #define USB_FEATURE_ENDPOINT_STALL        0x0000
 #define USB_FEATURE_REMOTE_WAKEUP         0x0001
 
 typedef struct _USB_INTERFACE_DESCRIPTOR {
-  UCHAR  bLength;
-  UCHAR  bDescriptorType;
-  UCHAR  bInterfaceNumber;
-  UCHAR  bAlternateSetting;
-  UCHAR  bNumEndpoints;
-  UCHAR  bInterfaceClass;
-  UCHAR  bInterfaceSubClass;
-  UCHAR  bInterfaceProtocol;
-  UCHAR  iInterface;
+  UCHAR bLength;
+  UCHAR bDescriptorType;
+  UCHAR bInterfaceNumber;
+  UCHAR bAlternateSetting;
+  UCHAR bNumEndpoints;
+  UCHAR bInterfaceClass;
+  UCHAR bInterfaceSubClass;
+  UCHAR bInterfaceProtocol;
+  UCHAR iInterface;
 } USB_INTERFACE_DESCRIPTOR, *PUSB_INTERFACE_DESCRIPTOR;
 
 typedef struct _USB_STRING_DESCRIPTOR {
-  UCHAR  bLength;
-  UCHAR  bDescriptorType;
-  WCHAR  bString[1];
+  UCHAR bLength;
+  UCHAR bDescriptorType;
+  WCHAR bString[1];
 } USB_STRING_DESCRIPTOR, *PUSB_STRING_DESCRIPTOR;
 
-#include <pshpack1.h>
 typedef struct _USB_HUB_DESCRIPTOR {
-       UCHAR  bDescriptorLength;
-       UCHAR  bDescriptorType;
-       UCHAR  bNumberOfPorts;
-       USHORT  wHubCharacteristics;
-       UCHAR  bPowerOnToPowerGood;
-       UCHAR  bHubControlCurrent;
-       UCHAR  bRemoveAndPowerMask[64];
+  UCHAR bDescriptorLength;
+  UCHAR bDescriptorType;
+  UCHAR bNumberOfPorts;
+  USHORT wHubCharacteristics;
+  UCHAR bPowerOnToPowerGood;
+  UCHAR bHubControlCurrent;
+  UCHAR bRemoveAndPowerMask[64];
 } USB_HUB_DESCRIPTOR, *PUSB_HUB_DESCRIPTOR;
-#include <poppack.h>
 
 #define USB_SUPPORT_D0_COMMAND            0x01
 #define USB_SUPPORT_D1_COMMAND            0x02
@@ -187,19 +182,19 @@ typedef struct _USB_HUB_DESCRIPTOR {
 #define USB_SUPPORT_D2_WAKEUP             0x20
 
 typedef struct _USB_CONFIGURATION_POWER_DESCRIPTOR {
-       UCHAR  bLength;
-       UCHAR  bDescriptorType;
-       UCHAR  SelfPowerConsumedD0[3];
-       UCHAR  bPowerSummaryId;
-       UCHAR  bBusPowerSavingD1;
-       UCHAR  bSelfPowerSavingD1;
-       UCHAR  bBusPowerSavingD2;
-       UCHAR  bSelfPowerSavingD2;
-       UCHAR  bBusPowerSavingD3;
-       UCHAR  bSelfPowerSavingD3;
-       USHORT  TransitionTimeFromD1;
-       USHORT  TransitionTimeFromD2;
-       USHORT  TransitionTimeFromD3;
+  UCHAR bLength;
+  UCHAR bDescriptorType;
+  UCHAR SelfPowerConsumedD0[3];
+  UCHAR bPowerSummaryId;
+  UCHAR bBusPowerSavingD1;
+  UCHAR bSelfPowerSavingD1;
+  UCHAR bBusPowerSavingD2;
+  UCHAR bSelfPowerSavingD2;
+  UCHAR bBusPowerSavingD3;
+  UCHAR bSelfPowerSavingD3;
+  USHORT TransitionTimeFromD1;
+  USHORT TransitionTimeFromD2;
+  USHORT TransitionTimeFromD3;
 } USB_CONFIGURATION_POWER_DESCRIPTOR, *PUSB_CONFIGURATION_POWER_DESCRIPTOR;
 
 #define USB_FEATURE_INTERFACE_POWER_D0    0x0002
@@ -207,25 +202,23 @@ typedef struct _USB_CONFIGURATION_POWER_DESCRIPTOR {
 #define USB_FEATURE_INTERFACE_POWER_D2    0x0004
 #define USB_FEATURE_INTERFACE_POWER_D3    0x0005
 
-#include <pshpack1.h>
 typedef struct _USB_INTERFACE_POWER_DESCRIPTOR {
-       UCHAR  bLength;
-       UCHAR  bDescriptorType;
-       UCHAR  bmCapabilitiesFlags;
-       UCHAR  bBusPowerSavingD1;
-       UCHAR  bSelfPowerSavingD1;
-       UCHAR  bBusPowerSavingD2;
-       UCHAR  bSelfPowerSavingD2;
-       UCHAR  bBusPowerSavingD3;
-       UCHAR  bSelfPowerSavingD3;
-       USHORT  TransitionTimeFromD1;
-       USHORT  TransitionTimeFromD2;
-       USHORT  TransitionTimeFromD3;
+  UCHAR  bLength;
+  UCHAR  bDescriptorType;
+  UCHAR  bmCapabilitiesFlags;
+  UCHAR  bBusPowerSavingD1;
+  UCHAR  bSelfPowerSavingD1;
+  UCHAR  bBusPowerSavingD2;
+  UCHAR  bSelfPowerSavingD2;
+  UCHAR  bBusPowerSavingD3;
+  UCHAR  bSelfPowerSavingD3;
+  USHORT  TransitionTimeFromD1;
+  USHORT  TransitionTimeFromD2;
+  USHORT  TransitionTimeFromD3;
 } USB_INTERFACE_POWER_DESCRIPTOR, *PUSB_INTERFACE_POWER_DESCRIPTOR;
+
 #include <poppack.h>
 
 #ifdef __cplusplus
 }
 #endif
-
-#endif /* __USB100_H */