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