]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbBusPei / UsbPeim.h
index dff8eeb2026d2b1ec7e4bc81ee61197a4b7a120c..caba53266daca02cc6b9980081e022810e09b5f7 100644 (file)
@@ -1,16 +1,9 @@
 /** @file\r
 Usb Peim definition.\r
 \r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved. <BR>\r
-  \r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions\r
-of the BSD License which accompanies this distribution.  The\r
-full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved. <BR>\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -33,6 +26,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <IndustryStandard/Usb.h>\r
 \r
+//\r
+// A common header for usb standard descriptor.\r
+// Each stand descriptor has a length and type.\r
+//\r
+#pragma pack(1)\r
+typedef struct {\r
+  UINT8                   Len;\r
+  UINT8                   Type;\r
+} USB_DESC_HEAD;\r
+#pragma pack()\r
+\r
 #define MAX_INTERFACE             8\r
 #define MAX_ENDPOINT              16\r
 \r
@@ -88,7 +92,7 @@ typedef struct {
 #define USB_WAIT_PORT_STS_CHANGE_STALL  (100)\r
 \r
 //\r
-// Host software return timeout if port status doesn't change \r
+// Host software return timeout if port status doesn't change\r
 // after 500ms(LOOP * STALL = 5000 * 0.1ms), set by experience\r
 //\r
 #define USB_WAIT_PORT_STS_CHANGE_LOOP   5000\r
@@ -112,7 +116,7 @@ typedef struct {
 \r
 /**\r
   Submits control transfer to a target USB device.\r
-  \r
+\r
   @param  PeiServices            The pointer of EFI_PEI_SERVICES.\r
   @param  This                   The pointer of PEI_USB_IO_PPI.\r
   @param  Request                USB device request to send.\r
@@ -144,11 +148,11 @@ PeiUsbControlTransfer (
 \r
 /**\r
   Submits bulk transfer to a bulk endpoint of a USB device.\r
-  \r
+\r
   @param  PeiServices           The pointer of EFI_PEI_SERVICES.\r
   @param  This                  The pointer of PEI_USB_IO_PPI.\r
   @param  DeviceEndpoint        Endpoint number and its direction in bit 7.\r
-  @param  Data                  A pointer to the buffer of data to transmit \r
+  @param  Data                  A pointer to the buffer of data to transmit\r
                                 from or receive into.\r
   @param  DataLength            The lenght of the data buffer.\r
   @param  Timeout               Indicates the maximum time, in millisecond, which the\r
@@ -233,7 +237,7 @@ PeiUsbPortReset (
 \r
 /**\r
   Send reset signal over the given root hub port.\r
-  \r
+\r
   @param  PeiServices       Describes the list of possible PEI Services.\r
   @param  UsbHcPpi          The pointer of PEI_USB_HOST_CONTROLLER_PPI instance.\r
   @param  Usb2HcPpi         The pointer of PEI_USB2_HOST_CONTROLLER_PPI instance.\r