]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h
Clean up to update the reference of the these macros:
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / EhciDxe / EhciUrb.h
index a1dc8e6c0a3b90f918e13c0a7971be2d643c1b91..7b66184a19acf2f7abcca90c843eabf4f63bb211 100644 (file)
@@ -1,5 +1,8 @@
 /** @file\r
 \r
+    This file contains URB request, each request is warpped in a\r
+    URB (Usb Request Block).\r
+\r
 Copyright (c) 2007, 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
@@ -9,17 +12,6 @@ http://opensource.org/licenses/bsd-license.php
 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
 \r
-Module Name:\r
-\r
-    EhciUrb.h\r
-\r
-Abstract:\r
-\r
-    This file contains URB request, each request is warpped in a\r
-    URB (Usb Request Block)\r
-\r
-Revision History\r
-\r
 **/\r
 \r
 #ifndef _EFI_EHCI_URB_H_\r
@@ -30,7 +22,7 @@ typedef struct _EHC_QTD  EHC_QTD;
 typedef struct _EHC_QH   EHC_QH;\r
 typedef struct _URB      URB;\r
 \r
-enum {\r
+typedef enum {\r
   //\r
   // Transfer types, used in URB to identify the transfer type\r
   //\r
@@ -39,9 +31,9 @@ enum {
   EHC_INT_TRANSFER_SYNC   = 0x04,\r
   EHC_INT_TRANSFER_ASYNC  = 0x08,\r
 \r
-  EHC_QTD_SIG             = EFI_SIGNATURE_32 ('U', 'S', 'B', 'T'),\r
-  EHC_QH_SIG              = EFI_SIGNATURE_32 ('U', 'S', 'B', 'H'),\r
-  EHC_URB_SIG             = EFI_SIGNATURE_32 ('U', 'S', 'B', 'R'),\r
+  EHC_QTD_SIG             = SIGNATURE_32 ('U', 'S', 'B', 'T'),\r
+  EHC_QH_SIG              = SIGNATURE_32 ('U', 'S', 'B', 'H'),\r
+  EHC_URB_SIG             = SIGNATURE_32 ('U', 'S', 'B', 'R'),\r
 \r
   //\r
   // Hardware related bit definitions\r
@@ -84,7 +76,7 @@ enum {
   QH_MICROFRAME_7         = 0x80,\r
 \r
   USB_ERR_SHORT_PACKET    = 0x200\r
-};\r
+}EHCI_URB_FLAG_VALUE;\r
 \r
 //\r
 // Fill in the hardware link point: pass in a EHC_QH/QH_HW\r
@@ -249,16 +241,16 @@ struct _URB {
 \r
 \r
 /**\r
-  Create a single QTD to hold the data\r
+  Create a single QTD to hold the data.\r
 \r
-  @param  Ehc        The EHCI device\r
-  @param  Data       Current data not associated with a QTD\r
-  @param  DataLen    The length of the data\r
-  @param  PktId      Packet ID to use in the QTD\r
-  @param  Toggle     Data toggle to use in the QTD\r
-  @param  MaxPacket  Maximu packet length of the endpoint\r
+  @param  Ehc        The EHCI device.\r
+  @param  Data       Current data not associated with a QTD.\r
+  @param  DataLen    The length of the data.\r
+  @param  PktId      Packet ID to use in the QTD.\r
+  @param  Toggle     Data toggle to use in the QTD.\r
+  @param  MaxPacket  Maximu packet length of the endpoint.\r
 \r
-  @return Created QTD or NULL if failed to create one\r
+  @return Created QTD or NULL if failed to create one.\r
 \r
 **/\r
 EHC_QTD *\r
@@ -269,64 +261,61 @@ EhcCreateQtd (
   IN UINT8                PktId,\r
   IN UINT8                Toggle,\r
   IN UINTN                MaxPacket\r
-  )\r
-;\r
+  );\r
 \r
 \r
 \r
 /**\r
-  Allocate and initialize a EHCI queue head\r
+  Allocate and initialize a EHCI queue head.\r
 \r
-  @param  Ehci       The EHCI device\r
-  @param  Ep         The endpoint to create queue head for\r
+  @param  Ehci       The EHCI device.\r
+  @param  Ep         The endpoint to create queue head for.\r
 \r
-  @return Created queue head or NULL if failed to create one\r
+  @return Created queue head or NULL if failed to create one.\r
 \r
 **/\r
 EHC_QH *\r
 EhcCreateQh (\r
   IN USB2_HC_DEV          *Ehci,\r
   IN USB_ENDPOINT         *Ep\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
   Free an allocated URB. It is possible for it to be partially inited.\r
 \r
-  @param  Ehc        The EHCI device\r
-  @param  Urb        The URB to free\r
+  @param  Ehc        The EHCI device.\r
+  @param  Urb        The URB to free.\r
 \r
-  @return None\r
+  @return None.\r
 \r
 **/\r
 VOID\r
 EhcFreeUrb (\r
   IN USB2_HC_DEV          *Ehc,\r
   IN URB                  *Urb\r
-  )\r
-;\r
+  );\r
 \r
 \r
 /**\r
-  Create a new URB and its associated QTD\r
-\r
-  @param  Ehc        The EHCI device\r
-  @param  DevAddr    The device address\r
-  @param  EpAddr     Endpoint addrress & its direction\r
-  @param  DevSpeed   The device speed\r
-  @param  Toggle     Initial data toggle to use\r
-  @param  MaxPacket  The max packet length of the endpoint\r
-  @param  Hub        The transaction translator to use\r
-  @param  Type       The transaction type\r
-  @param  Request    The standard USB request for control transfer\r
-  @param  Data       The user data to transfer\r
-  @param  DataLen    The length of data buffer\r
-  @param  Callback   The function to call when data is transferred\r
-  @param  Context    The context to the callback\r
-  @param  Interval   The interval for interrupt transfer\r
-\r
-  @return Created URB or NULL\r
+  Create a new URB and its associated QTD.\r
+\r
+  @param  Ehc        The EHCI device.\r
+  @param  DevAddr    The device address.\r
+  @param  EpAddr     Endpoint addrress & its direction.\r
+  @param  DevSpeed   The device speed.\r
+  @param  Toggle     Initial data toggle to use.\r
+  @param  MaxPacket  The max packet length of the endpoint.\r
+  @param  Hub        The transaction translator to use.\r
+  @param  Type       The transaction type.\r
+  @param  Request    The standard USB request for control transfer.\r
+  @param  Data       The user data to transfer.\r
+  @param  DataLen    The length of data buffer.\r
+  @param  Callback   The function to call when data is transferred.\r
+  @param  Context    The context to the callback.\r
+  @param  Interval   The interval for interrupt transfer.\r
+\r
+  @return Created URB or NULL.\r
 \r
 **/\r
 URB *\r
@@ -345,6 +334,5 @@ EhcCreateUrb (
   IN EFI_ASYNC_USB_TRANSFER_CALLBACK    Callback,\r
   IN VOID                               *Context,\r
   IN UINTN                              Interval\r
-  )\r
-;\r
+  );\r
 #endif\r