]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.h
Improve coding style in MdeModulePkg.
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbMassStorageDxe / UsbMassBot.h
index 63d9fecd815db7da3afc4a15bc89f2493a0755b0..341adce9b853fd4f2cd70b62a3abc65c93e1e72c 100644 (file)
@@ -3,7 +3,7 @@
   based on the "Universal Serial Bus Mass Storage Class Bulk-Only\r
   Transport" Revision 1.0, September 31, 1999.\r
 \r
-Copyright (c) 2007 - 2008, Intel Corporation\r
+Copyright (c) 2007 - 2010, 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
@@ -21,41 +21,39 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 extern USB_MASS_TRANSPORT mUsbBotTransport;\r
 \r
-typedef enum {\r
-  //\r
-  // Usb Bulk-Only class specfic request\r
-  //\r
-  USB_BOT_RESET_REQUEST    = 0xFF,       ///< Bulk-Only Mass Storage Reset\r
-  USB_BOT_GETLUN_REQUEST   = 0xFE,       ///< Get Max Lun\r
-  USB_BOT_CBW_SIGNATURE    = 0x43425355, ///< dCBWSignature, tag the packet as CBW\r
-  USB_BOT_CSW_SIGNATURE    = 0x53425355, ///< dCSWSignature, tag the packet as CSW\r
-  USB_BOT_MAX_LUN          = 0x0F,       ///< Lun number is from 0 to 15\r
-  USB_BOT_MAX_CMDLEN       = 16,         ///< Maxium number of command from command set\r
-\r
-  //\r
-  // Usb BOT command block status values\r
-  //\r
-  USB_BOT_COMMAND_OK       = 0x00, ///< Command passed, good status\r
-  USB_BOT_COMMAND_FAILED   = 0x01, ///< Command failed\r
-  USB_BOT_COMMAND_ERROR    = 0x02, ///< Phase error, need to reset the device\r
-\r
-  //\r
-  // Usb Bot retry to get CSW, refers to specification[BOT10-5.3, it says 2 times]\r
-  //\r
-  USB_BOT_RECV_CSW_RETRY = 3,\r
-\r
-  //\r
-  // Usb Bot wait device reset complete, set by experience\r
-  //  \r
-  USB_BOT_RESET_DEVICE_STALL = 100 * USB_MASS_1_MILLISECOND,\r
-  \r
-  //\r
-  // Usb Bot transport timeout, set by experience\r
-  //\r
-  USB_BOT_SEND_CBW_TIMEOUT     = 3 * USB_MASS_1_SECOND,\r
-  USB_BOT_RECV_CSW_TIMEOUT     = 3 * USB_MASS_1_SECOND,\r
-  USB_BOT_RESET_DEVICE_TIMEOUT = 3 * USB_MASS_1_SECOND\r
-} USB_BOT_SUBCLASS;\r
+//\r
+// Usb Bulk-Only class specfic request\r
+//\r
+#define USB_BOT_RESET_REQUEST    0xFF       ///< Bulk-Only Mass Storage Reset\r
+#define USB_BOT_GETLUN_REQUEST   0xFE       ///< Get Max Lun\r
+#define USB_BOT_CBW_SIGNATURE    0x43425355 ///< dCBWSignature, tag the packet as CBW\r
+#define USB_BOT_CSW_SIGNATURE    0x53425355 ///< dCSWSignature, tag the packet as CSW\r
+#define USB_BOT_MAX_LUN          0x0F       ///< Lun number is from 0 to 15\r
+#define USB_BOT_MAX_CMDLEN       16         ///< Maxium number of command from command set\r
+\r
+//\r
+// Usb BOT command block status values\r
+//\r
+#define USB_BOT_COMMAND_OK       0x00 ///< Command passed, good status\r
+#define USB_BOT_COMMAND_FAILED   0x01 ///< Command failed\r
+#define USB_BOT_COMMAND_ERROR    0x02 ///< Phase error, need to reset the device\r
+\r
+//\r
+// Usb Bot retry to get CSW, refers to specification[BOT10-5.3, it says 2 times]\r
+//\r
+#define USB_BOT_RECV_CSW_RETRY   3\r
+\r
+//\r
+// Usb Bot wait device reset complete, set by experience\r
+//  \r
+#define USB_BOT_RESET_DEVICE_STALL  (100 * USB_MASS_1_MILLISECOND)\r
+\r
+//\r
+// Usb Bot transport timeout, set by experience\r
+//\r
+#define USB_BOT_SEND_CBW_TIMEOUT     (3 * USB_MASS_1_SECOND)\r
+#define USB_BOT_RECV_CSW_TIMEOUT     (3 * USB_MASS_1_SECOND)\r
+#define USB_BOT_RESET_DEVICE_TIMEOUT (3 * USB_MASS_1_SECOND)\r
 \r
 #pragma pack(1)\r
 ///\r