]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/IndustryStandard/Usb.h
MdePkg: add missing #defines for decoding PCIe 2.1 extended capability structures
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / Usb.h
index ef4acc8999e2fbd43d442578ae41da6b4f4eead4..c4367b58bb8861a6f7f79676961df2f317c59b75 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
-  Support for USB 1.1 standard.\r
+  Support for USB 2.0 standard.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2008, 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
@@ -17,7 +17,7 @@
 \r
 //\r
 // Standard device request and request type\r
-// By [Spec-USB20/Chapter-9.4]\r
+// USB 2.0 spec, Section 9.4\r
 //\r
 #define USB_DEV_GET_STATUS                  0x00\r
 #define USB_DEV_GET_STATUS_REQ_TYPE_D       0x80 // Receiver : Device\r
 // USB standard descriptors and reqeust\r
 //\r
 #pragma pack(1)\r
+\r
+///\r
+/// Format of Setup Data for USB Device Requests\r
+/// USB 2.0 spec, Section 9.3\r
+///\r
 typedef struct {\r
   UINT8           RequestType;\r
   UINT8           Request;\r
@@ -71,6 +76,10 @@ typedef struct {
   UINT16          Length;\r
 } USB_DEVICE_REQUEST;\r
 \r
+///\r
+/// Standard Device Descriptor\r
+/// USB 2.0 spec, Section 9.6.1\r
+///\r
 typedef struct {\r
   UINT8           Length;\r
   UINT8           DescriptorType;\r
@@ -88,6 +97,10 @@ typedef struct {
   UINT8           NumConfigurations;\r
 } USB_DEVICE_DESCRIPTOR;\r
 \r
+///\r
+/// Standard Configuration Descriptor\r
+/// USB 2.0 spec, Section 9.6.3\r
+///\r
 typedef struct {\r
   UINT8           Length;\r
   UINT8           DescriptorType;\r
@@ -99,6 +112,10 @@ typedef struct {
   UINT8           MaxPower;\r
 } USB_CONFIG_DESCRIPTOR;\r
 \r
+///\r
+/// Standard Interface Descriptor\r
+/// USB 2.0 spec, Section 9.6.5\r
+///\r
 typedef struct {\r
   UINT8           Length;\r
   UINT8           DescriptorType;\r
@@ -111,6 +128,10 @@ typedef struct {
   UINT8           Interface;\r
 } USB_INTERFACE_DESCRIPTOR;\r
 \r
+///\r
+/// Standard Endpoint Descriptor\r
+/// USB 2.0 spec, Section 9.6.6\r
+///\r
 typedef struct {\r
   UINT8           Length;\r
   UINT8           DescriptorType;\r
@@ -120,6 +141,10 @@ typedef struct {
   UINT8           Interval;\r
 } USB_ENDPOINT_DESCRIPTOR;\r
 \r
+///\r
+/// UNICODE String Descriptor\r
+/// USB 2.0 spec, Section 9.6.7\r
+///\r
 typedef struct {\r
   UINT8           Length;\r
   UINT8           DescriptorType;\r
@@ -170,6 +195,7 @@ typedef enum {
   USB_DESC_TYPE_INTERFACE = 0x04,\r
   USB_DESC_TYPE_ENDPOINT  = 0x05,\r
   USB_DESC_TYPE_HID       = 0x21,\r
+  USB_DESC_TYPE_REPORT    = 0x22,\r
 \r
   //\r
   // Features to be cleared by CLEAR_FEATURE requests\r
@@ -195,8 +221,20 @@ typedef enum {
 \r
 \r
 //\r
-// HID constants definition, see HID rev1.0\r
+// HID constants definition, see Device Class Definition\r
+// for Human Interface Devices (HID) rev1.11\r
+//\r
+\r
+//\r
+// HID standard GET_DESCRIPTOR request.\r
+//\r
+#define USB_HID_GET_DESCRIPTOR_REQ_TYPE  0x81\r
+\r
+//\r
+// HID specific requests.\r
 //\r
+#define USB_HID_CLASS_GET_REQ_TYPE       0xa1\r
+#define USB_HID_CLASS_SET_REQ_TYPE       0x21\r
 \r
 //\r
 // HID report item format\r
@@ -296,12 +334,18 @@ 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
   UINT16  DescriptorLength;\r
 } EFI_USB_HID_CLASS_DESCRIPTOR;\r
 \r
+///\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
   UINT8                         DescriptorType;\r