]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/UsbIo.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Protocol / UsbIo.h
index e29f60b19cb86aa18c3614b49eb3789ffaf81e9a..838db0408d527533f537afd541d589067b551f5c 100644 (file)
@@ -1,18 +1,12 @@
 /** @file\r
   EFI Usb I/O Protocol as defined in UEFI specification.\r
-  This protocol is used by code, typically drivers, running in the EFI \r
-  boot services environment to access USB devices like USB keyboards, \r
-  mice and mass storage devices. In particular, functions for managing devices \r
+  This protocol is used by code, typically drivers, running in the EFI\r
+  boot services environment to access USB devices like USB keyboards,\r
+  mice and mass storage devices. In particular, functions for managing devices\r
   on USB buses are defined here.\r
-  \r
-  Copyright (c) 2006 - 2008, Intel Corporation\r
-  All rights reserved. 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
 \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
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -134,13 +128,13 @@ EFI_STATUS
   typically used to transfer large amounts of data to/from USB devices.\r
 \r
   @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.\r
-  @param  DeviceEndpoint        The destination USB device endpoint to which the \r
-                                device request is being sent. DeviceEndpoint must \r
-                                be between 0x01 and 0x0F or between 0x81 and 0x8F, \r
-                                otherwise EFI_INVALID_PARAMETER is returned. If \r
-                                the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER \r
-                                is returned. The MSB of this parameter indicates \r
-                                the endpoint direction. The number "1" stands for \r
+  @param  DeviceEndpoint        The destination USB device endpoint to which the\r
+                                device request is being sent. DeviceEndpoint must\r
+                                be between 0x01 and 0x0F or between 0x81 and 0x8F,\r
+                                otherwise EFI_INVALID_PARAMETER is returned. If\r
+                                the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER\r
+                                is returned. The MSB of this parameter indicates\r
+                                the endpoint direction. The number "1" stands for\r
                                 an IN endpoint, and "0" stands for an OUT endpoint.\r
   @param  Data                  A pointer to the buffer of data that will be transmitted to USB\r
                                 device or received from USB device.\r
@@ -148,8 +142,8 @@ EFI_STATUS
                                 On input, the size, in bytes, of the data buffer specified by Data.\r
                                 On output, the number of bytes that were actually transferred.\r
   @param  Timeout               Indicating the transfer should be completed within this time frame.\r
-                                The units are in milliseconds. If Timeout is 0, then the \r
-                                caller must wait for the function to be completed until \r
+                                The units are in milliseconds. If Timeout is 0, then the\r
+                                caller must wait for the function to be completed until\r
                                 EFI_SUCCESS or EFI_DEVICE_ERROR is returned.\r
   @param  Status                This parameter indicates the USB transfer status.\r
 \r
@@ -178,27 +172,27 @@ EFI_STATUS
   a fixed rate.\r
 \r
   @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.\r
-  @param  DeviceEndpoint        The destination USB device endpoint to which the \r
-                                device request is being sent. DeviceEndpoint must \r
-                                be between 0x01 and 0x0F or between 0x81 and 0x8F, \r
-                                otherwise EFI_INVALID_PARAMETER is returned. If \r
-                                the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER \r
-                                is returned. The MSB of this parameter indicates \r
-                                the endpoint direction. The number "1" stands for \r
+  @param  DeviceEndpoint        The destination USB device endpoint to which the\r
+                                device request is being sent. DeviceEndpoint must\r
+                                be between 0x01 and 0x0F or between 0x81 and 0x8F,\r
+                                otherwise EFI_INVALID_PARAMETER is returned. If\r
+                                the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER\r
+                                is returned. The MSB of this parameter indicates\r
+                                the endpoint direction. The number "1" stands for\r
                                 an IN endpoint, and "0" stands for an OUT endpoint.\r
   @param  IsNewTransfer         If TRUE, a new transfer will be submitted to USB controller. If\r
                                 FALSE, the interrupt transfer is deleted from the device's interrupt\r
                                 transfer queue.\r
   @param  PollingInterval       Indicates the periodic rate, in milliseconds, that the transfer is to be\r
-                                executed.This parameter is required when IsNewTransfer is TRUE. The \r
-                                value must be between 1 to 255, otherwise EFI_INVALID_PARAMETER is returned. \r
+                                executed.This parameter is required when IsNewTransfer is TRUE. The\r
+                                value must be between 1 to 255, otherwise EFI_INVALID_PARAMETER is returned.\r
                                 The units are in milliseconds.\r
   @param  DataLength            Specifies the length, in bytes, of the data to be received from the\r
                                 USB device. This parameter is only required when IsNewTransfer is TRUE.\r
   @param  InterruptCallback     The Callback function. This function is called if the asynchronous\r
-                                interrupt transfer is completed. This parameter is required \r
+                                interrupt transfer is completed. This parameter is required\r
                                 when IsNewTransfer is TRUE.\r
-  @param  Context               Data passed to the InterruptCallback function. This is an optional \r
+  @param  Context               Data passed to the InterruptCallback function. This is an optional\r
                                 parameter and may be NULL.\r
 \r
   @retval EFI_SUCCESS           The asynchronous USB transfer request transfer has been successfully executed.\r
@@ -221,21 +215,21 @@ EFI_STATUS
   This function is used to manage a USB device with an interrupt transfer pipe.\r
 \r
   @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.\r
-  @param  DeviceEndpoint        The destination USB device endpoint to which the \r
-                                device request is being sent. DeviceEndpoint must \r
-                                be between 0x01 and 0x0F or between 0x81 and 0x8F, \r
-                                otherwise EFI_INVALID_PARAMETER is returned. If \r
-                                the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER \r
-                                is returned. The MSB of this parameter indicates \r
-                                the endpoint direction. The number "1" stands for \r
+  @param  DeviceEndpoint        The destination USB device endpoint to which the\r
+                                device request is being sent. DeviceEndpoint must\r
+                                be between 0x01 and 0x0F or between 0x81 and 0x8F,\r
+                                otherwise EFI_INVALID_PARAMETER is returned. If\r
+                                the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER\r
+                                is returned. The MSB of this parameter indicates\r
+                                the endpoint direction. The number "1" stands for\r
                                 an IN endpoint, and "0" stands for an OUT endpoint.\r
   @param  Data                  A pointer to the buffer of data that will be transmitted to USB\r
                                 device or received from USB device.\r
   @param  DataLength            On input, then size, in bytes, of the buffer Data. On output, the\r
                                 amount of data actually transferred.\r
-  @param  Timeout               The time out, in seconds, for this transfer. If Timeout is 0, \r
-                                then the caller must wait for the function to be completed \r
-                                until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. If the \r
+  @param  Timeout               The time out, in seconds, for this transfer. If Timeout is 0,\r
+                                then the caller must wait for the function to be completed\r
+                                until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. If the\r
                                 transfer is not completed in this time frame, then EFI_TIMEOUT is returned.\r
   @param  Status                This parameter indicates the USB transfer status.\r
 \r
@@ -261,13 +255,13 @@ EFI_STATUS
   transfer is typically used to transfer streaming data.\r
 \r
   @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.\r
-  @param  DeviceEndpoint        The destination USB device endpoint to which the \r
-                                device request is being sent. DeviceEndpoint must \r
-                                be between 0x01 and 0x0F or between 0x81 and 0x8F, \r
-                                otherwise EFI_INVALID_PARAMETER is returned. If \r
-                                the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER \r
-                                is returned. The MSB of this parameter indicates \r
-                                the endpoint direction. The number "1" stands for \r
+  @param  DeviceEndpoint        The destination USB device endpoint to which the\r
+                                device request is being sent. DeviceEndpoint must\r
+                                be between 0x01 and 0x0F or between 0x81 and 0x8F,\r
+                                otherwise EFI_INVALID_PARAMETER is returned. If\r
+                                the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER\r
+                                is returned. The MSB of this parameter indicates\r
+                                the endpoint direction. The number "1" stands for\r
                                 an IN endpoint, and "0" stands for an OUT endpoint.\r
   @param  Data                  A pointer to the buffer of data that will be transmitted to USB\r
                                 device or received from USB device.\r
@@ -296,19 +290,19 @@ EFI_STATUS
   transfer is typically used to transfer streaming data.\r
 \r
   @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.\r
-  @param  DeviceEndpoint        The destination USB device endpoint to which the \r
-                                device request is being sent. DeviceEndpoint must \r
-                                be between 0x01 and 0x0F or between 0x81 and 0x8F, \r
-                                otherwise EFI_INVALID_PARAMETER is returned. If \r
-                                the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER \r
-                                is returned. The MSB of this parameter indicates \r
-                                the endpoint direction. The number "1" stands for \r
+  @param  DeviceEndpoint        The destination USB device endpoint to which the\r
+                                device request is being sent. DeviceEndpoint must\r
+                                be between 0x01 and 0x0F or between 0x81 and 0x8F,\r
+                                otherwise EFI_INVALID_PARAMETER is returned. If\r
+                                the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER\r
+                                is returned. The MSB of this parameter indicates\r
+                                the endpoint direction. The number "1" stands for\r
                                 an IN endpoint, and "0" stands for an OUT endpoint.\r
   @param  Data                  A pointer to the buffer of data that will be transmitted to USB\r
                                 device or received from USB device.\r
   @param  DataLength            The size, in bytes, of the data buffer specified by Data.\r
                                 This is an optional parameter and may be NULL.\r
-  @param  IsochronousCallback   The IsochronousCallback() function.This function is \r
+  @param  IsochronousCallback   The IsochronousCallback() function.This function is\r
                                 called if the requested isochronous transfer is completed.\r
   @param  Context               Data passed to the IsochronousCallback() function.\r
 \r
@@ -426,15 +420,15 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  Retrieves a Unicode string stored in a USB Device.\r
+  Retrieves a string stored in a USB Device.\r
 \r
   @param  This                    A pointer to the EFI_USB_IO_PROTOCOL instance.\r
   @param  LangID                  The Language ID for the string being retrieved.\r
   @param  StringID                The ID of the string being retrieved.\r
   @param  String                  A pointer to a buffer allocated by this function with\r
-                                  AllocatePool() to store the string.If this function \r
-                                  returns EFI_SUCCESS, it stores the string the caller \r
-                                  wants to get. The caller should release the string \r
+                                  AllocatePool() to store the string.If this function\r
+                                  returns EFI_SUCCESS, it stores the string the caller\r
+                                  wants to get. The caller should release the string\r
                                   buffer with FreePool() after the string is not used any more.\r
 \r
   @retval EFI_SUCCESS             The string was retrieved successfully.\r
@@ -456,9 +450,9 @@ EFI_STATUS
 \r
   @param  This                    A pointer to the EFI_USB_IO_PROTOCOL instance.\r
   @param  LangIDTable             Language ID for the string the caller wants to get.\r
-                                  This is a 16-bit ID defined by Microsoft. This \r
-                                  buffer pointer is allocated and maintained by \r
-                                  the USB Bus Driver, the caller should not modify \r
+                                  This is a 16-bit ID defined by Microsoft. This\r
+                                  buffer pointer is allocated and maintained by\r
+                                  the USB Bus Driver, the caller should not modify\r
                                   its contents.\r
   @param  TableSize               The size, in bytes, of the table LangIDTable.\r
 \r
@@ -474,11 +468,11 @@ EFI_STATUS
   );\r
 \r
 ///\r
-/// The EFI_USB_IO_PROTOCOL provides four basic transfers types described \r
-/// in the USB 1.1 Specification. These include control transfer, interrupt \r
-/// transfer, bulk transfer and isochronous transfer. The EFI_USB_IO_PROTOCOL \r
-/// also provides some basic USB device/controller management and configuration \r
-/// interfaces. A USB device driver uses the services of this protocol to manage USB devices.  \r
+/// The EFI_USB_IO_PROTOCOL provides four basic transfers types described\r
+/// in the USB 1.1 Specification. These include control transfer, interrupt\r
+/// transfer, bulk transfer and isochronous transfer. The EFI_USB_IO_PROTOCOL\r
+/// also provides some basic USB device/controller management and configuration\r
+/// interfaces. A USB device driver uses the services of this protocol to manage USB devices.\r
 ///\r
 struct _EFI_USB_IO_PROTOCOL {\r
   //\r