]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbBusDxe / UsbBus.h
index 872f6cef9a26b515440e0172a1cb2c42c8856bc2..ff04103be994c0a239895503d79064422c003688 100644 (file)
@@ -2,8 +2,8 @@
 \r
     Usb Bus Driver Binding and Bus IO Protocol.\r
 \r
-Copyright (c) 2004 - 2007, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2004 - 2010, 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
@@ -47,78 +47,83 @@ typedef struct _USB_HUB_API    USB_HUB_API;
 #include "UsbHub.h"\r
 #include "UsbEnumer.h"\r
 \r
-typedef enum {\r
-  USB_MAX_LANG_ID           = 16,\r
-  USB_MAX_INTERFACE         = 16,\r
-  USB_MAX_DEVICES           = 128,\r
+//\r
+// USB bus timeout experience values\r
+//\r
 \r
-  USB_BUS_1_MILLISECOND     = 1000,\r
+#define USB_MAX_LANG_ID           16\r
+#define USB_MAX_INTERFACE         16\r
+#define USB_MAX_DEVICES           128\r
 \r
-  //\r
-  // Roothub and hub's polling interval, set by experience,\r
-  // The unit of roothub is 100us, means 1s as interval, and\r
-  // the unit of hub is 1ms, means 64ms as interval.\r
-  //\r
-  USB_ROOTHUB_POLL_INTERVAL = 1000 * 10000U,\r
-  USB_HUB_POLL_INTERVAL     = 64,\r
+#define USB_BUS_1_MILLISECOND     1000\r
 \r
-  //\r
-  // Wait for port stable to work, refers to specification\r
-  // [USB20-9.1.2]\r
-  //\r
-  USB_WAIT_PORT_STABLE_STALL     = 100 * USB_BUS_1_MILLISECOND,\r
+//\r
+// Roothub and hub's polling interval, set by experience,\r
+// The unit of roothub is 100us, means 1s as interval, and\r
+// the unit of hub is 1ms, means 64ms as interval.\r
+//\r
+#define USB_ROOTHUB_POLL_INTERVAL (1000 * 10000U)\r
+#define USB_HUB_POLL_INTERVAL     64\r
 \r
-  //\r
-  // Wait for port statue reg change, set by experience\r
-  //\r
-  USB_WAIT_PORT_STS_CHANGE_STALL = 5 * USB_BUS_1_MILLISECOND,\r
+//\r
+// Wait for port stable to work, refers to specification\r
+// [USB20-9.1.2]\r
+//\r
+#define USB_WAIT_PORT_STABLE_STALL  (100 * USB_BUS_1_MILLISECOND)\r
 \r
-  //\r
-  // Wait for set device address, refers to specification\r
-  // [USB20-9.2.6.3, it says 2ms]\r
-  //\r
-  USB_SET_DEVICE_ADDRESS_STALL   = 20 * USB_BUS_1_MILLISECOND,\r
+//\r
+// Wait for port statue reg change, set by experience\r
+//\r
+#define USB_WAIT_PORT_STS_CHANGE_STALL (5 * USB_BUS_1_MILLISECOND)\r
 \r
-  //\r
-  // Wait for retry max packet size, set by experience\r
-  //\r
-  USB_RETRY_MAX_PACK_SIZE_STALL  = 100 * USB_BUS_1_MILLISECOND,\r
+//\r
+// Wait for set device address, refers to specification\r
+// [USB20-9.2.6.3, it says 2ms]\r
+//\r
+#define USB_SET_DEVICE_ADDRESS_STALL   (20 * USB_BUS_1_MILLISECOND)\r
 \r
-  //\r
-  // Wait for hub port power-on, refers to specification\r
-  // [USB20-11.23.2]\r
-  //\r
-  USB_SET_PORT_POWER_STALL       = 2 * USB_BUS_1_MILLISECOND,\r
+//\r
+// Wait for retry max packet size, set by experience\r
+//\r
+#define USB_RETRY_MAX_PACK_SIZE_STALL  (100 * USB_BUS_1_MILLISECOND)\r
 \r
-  //\r
-  // Wait for port reset, refers to specification\r
-  // [USB20-7.1.7.5, it says 10ms for hub and 50ms for\r
-  // root hub]\r
-  //\r
-  USB_SET_PORT_RESET_STALL       = 20 * USB_BUS_1_MILLISECOND,\r
-  USB_SET_ROOT_PORT_RESET_STALL  = 50 * USB_BUS_1_MILLISECOND,\r
+//\r
+// Wait for hub port power-on, refers to specification\r
+// [USB20-11.23.2]\r
+//\r
+#define USB_SET_PORT_POWER_STALL       (2 * USB_BUS_1_MILLISECOND)\r
 \r
-  //\r
-  // Wait for clear roothub port reset, set by experience\r
-  //\r
-  USB_CLR_ROOT_PORT_RESET_STALL  = 1 * USB_BUS_1_MILLISECOND,\r
+//\r
+// Wait for port reset, refers to specification\r
+// [USB20-7.1.7.5, it says 10ms for hub and 50ms for\r
+// root hub]\r
+//\r
+#define USB_SET_PORT_RESET_STALL       (20 * USB_BUS_1_MILLISECOND)\r
+#define USB_SET_ROOT_PORT_RESET_STALL  (50 * USB_BUS_1_MILLISECOND)\r
 \r
-  //\r
-  // Wait for set roothub port enable, set by experience\r
-  //\r
-  USB_SET_ROOT_PORT_ENABLE_STALL = 20 * USB_BUS_1_MILLISECOND,\r
+//\r
+// Wait for clear roothub port reset, set by experience\r
+//\r
+#define USB_CLR_ROOT_PORT_RESET_STALL  (20 * USB_BUS_1_MILLISECOND)\r
 \r
-  //\r
-  // Send general device request timeout, refers to\r
-  // specification[USB20-11.24.1]\r
-  //\r
-  USB_GENERAL_DEVICE_REQUEST_TIMEOUT = 50 * USB_BUS_1_MILLISECOND,\r
+//\r
+// Wait for set roothub port enable, set by experience\r
+//\r
+#define USB_SET_ROOT_PORT_ENABLE_STALL (20 * USB_BUS_1_MILLISECOND)\r
 \r
-  //\r
-  // Send clear feature request timeout, set by experience\r
-  //\r
-  USB_CLEAR_FEATURE_REQUEST_TIMEOUT  = 10 * USB_BUS_1_MILLISECOND\r
-}USB_BUS_TIMEOUT_EXPERIENCE_VALUE;\r
+//\r
+// Send general device request timeout.\r
+// \r
+// The USB Specification 2.0, section 11.24.1 recommends a value of\r
+// 50 milliseconds.  We use a value of 100 milliseconds to work\r
+// around slower hubs and devices.\r
+//\r
+#define USB_GENERAL_DEVICE_REQUEST_TIMEOUT 100\r
+\r
+//\r
+// Send clear feature request timeout, set by experience\r
+//\r
+#define USB_CLEAR_FEATURE_REQUEST_TIMEOUT  10\r
 \r
 //\r
 // Bus raises TPL to TPL_NOTIFY to serialize all its operations\r