]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/IndustryStandard/Usb.h
MdePkg: TpmPtp: Add CapCRBIdleBypass definition
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / Usb.h
index 5ec270c7a118840d6240967019f4d91f32cd164c..c27ea15b4122af09cd49bda3daa4fcf42ad9eacf 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Support for USB 2.0 standard.\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   http://opensource.org/licenses/bsd-license.php\r
 #ifndef __USB_H__\r
 #define __USB_H__\r
 \r
+//\r
+// Subset of Class and Subclass definitions from USB Specs\r
+//\r
+\r
+//\r
+// Usb mass storage class code\r
+//\r
+#define USB_MASS_STORE_CLASS    0x08\r
+\r
+//\r
+// Usb mass storage subclass code, specify the command set used.\r
+//\r
+#define USB_MASS_STORE_RBC      0x01 ///< Reduced Block Commands\r
+#define USB_MASS_STORE_8020I    0x02 ///< SFF-8020i, typically a CD/DVD device\r
+#define USB_MASS_STORE_QIC      0x03 ///< Typically a tape device\r
+#define USB_MASS_STORE_UFI      0x04 ///< Typically a floppy disk driver device\r
+#define USB_MASS_STORE_8070I    0x05 ///< SFF-8070i, typically a floppy disk driver device.\r
+#define USB_MASS_STORE_SCSI     0x06 ///< SCSI transparent command set\r
+\r
+//\r
+// Usb mass storage protocol code, specify the transport protocol\r
+//\r
+#define USB_MASS_STORE_CBI0     0x00 ///< CBI protocol with command completion interrupt\r
+#define USB_MASS_STORE_CBI1     0x01 ///< CBI protocol without command completion interrupt\r
+#define USB_MASS_STORE_BOT      0x50 ///< Bulk-Only Transport\r
+\r
 //\r
 // Standard device request and request type\r
 // USB 2.0 spec, Section 9.4\r
@@ -62,6 +88,7 @@
 //\r
 // USB standard descriptors and reqeust\r
 //\r
+#pragma pack(1)\r
 \r
 ///\r
 /// Format of Setup Data for USB Device Requests\r
@@ -96,7 +123,6 @@ typedef struct {
   UINT8           NumConfigurations;\r
 } USB_DEVICE_DESCRIPTOR;\r
 \r
-#pragma pack(1)\r
 ///\r
 /// Standard Configuration Descriptor\r
 /// USB 2.0 spec, Section 9.6.3\r
@@ -111,7 +137,6 @@ typedef struct {
   UINT8           Attributes;\r
   UINT8           MaxPower;\r
 } USB_CONFIG_DESCRIPTOR;\r
-#pragma pack()\r
 \r
 ///\r
 /// Standard Interface Descriptor\r
@@ -129,7 +154,6 @@ typedef struct {
   UINT8           Interface;\r
 } USB_INTERFACE_DESCRIPTOR;\r
 \r
-#pragma pack(1)\r
 ///\r
 /// Standard Endpoint Descriptor\r
 /// USB 2.0 spec, Section 9.6.6\r
@@ -142,7 +166,6 @@ typedef struct {
   UINT16          MaxPacketSize;\r
   UINT8           Interval;\r
 } USB_ENDPOINT_DESCRIPTOR;\r
-#pragma pack()\r
 \r
 ///\r
 /// UNICODE String Descriptor\r
@@ -154,6 +177,9 @@ typedef struct {
   CHAR16          String[1];\r
 } EFI_USB_STRING_DESCRIPTOR;\r
 \r
+#pragma pack()\r
+\r
+\r
 typedef enum {\r
   //\r
   // USB request type\r
@@ -334,6 +360,7 @@ typedef enum {
 #pragma pack(1)\r
 ///\r
 /// Descriptor header for Report/Physical Descriptors\r
+/// HID 1.1, section 6.2.1\r
 ///\r
 typedef struct hid_class_descriptor {\r
   UINT8   DescriptorType;\r
@@ -343,6 +370,7 @@ typedef struct hid_class_descriptor {
 ///\r
 /// The HID descriptor identifies the length and type\r
 /// of subordinate descriptors for a device.\r
+/// HID 1.1, section 6.2.1\r
 ///\r
 typedef struct hid_descriptor {\r
   UINT8                         Length;\r
@@ -352,6 +380,7 @@ typedef struct hid_descriptor {
   UINT8                         NumDescriptors;\r
   EFI_USB_HID_CLASS_DESCRIPTOR  HidClassDesc[1];\r
 } EFI_USB_HID_DESCRIPTOR;\r
+\r
 #pragma pack()\r
 \r
 #endif\r