]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.h
MdeModulePkg: Apply uncrustify changes
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbMassStorageDxe / UsbMassBot.h
index 3ef8f240a2c1547343ec6b37a0aa062f0441c9ec..cf8e9a3bdd709eabcf531ec07ae5e1e476379c30 100644 (file)
@@ -11,29 +11,29 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #ifndef _EFI_USBMASS_BOT_H_\r
 #define _EFI_USBMASS_BOT_H_\r
 \r
-extern USB_MASS_TRANSPORT mUsbBotTransport;\r
+extern USB_MASS_TRANSPORT  mUsbBotTransport;\r
 \r
 //\r
 // Usb Bulk-Only class specific 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         ///< Maximum number of command from command set\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          ///< Maximum 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
+#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
+#define USB_BOT_RECV_CSW_RETRY  3\r
 \r
 //\r
 // Usb Bot wait device reset complete, set by experience\r
@@ -43,32 +43,32 @@ extern USB_MASS_TRANSPORT mUsbBotTransport;
 //\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
+#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
 /// The CBW (Command Block Wrapper) structures used by the USB BOT protocol.\r
 ///\r
 typedef struct {\r
-  UINT32              Signature;\r
-  UINT32              Tag;\r
-  UINT32              DataLen;  ///< Length of data between CBW and CSW\r
-  UINT8               Flag;     ///< Bit 7, 0 ~ Data-Out, 1 ~ Data-In\r
-  UINT8               Lun;      ///< Lun number. Bits 0~3 are used\r
-  UINT8               CmdLen;   ///< Length of the command. Bits 0~4 are used\r
-  UINT8               CmdBlock[USB_BOT_MAX_CMDLEN];\r
+  UINT32    Signature;\r
+  UINT32    Tag;\r
+  UINT32    DataLen;            ///< Length of data between CBW and CSW\r
+  UINT8     Flag;               ///< Bit 7, 0 ~ Data-Out, 1 ~ Data-In\r
+  UINT8     Lun;                ///< Lun number. Bits 0~3 are used\r
+  UINT8     CmdLen;             ///< Length of the command. Bits 0~4 are used\r
+  UINT8     CmdBlock[USB_BOT_MAX_CMDLEN];\r
 } USB_BOT_CBW;\r
 \r
 ///\r
 /// The and CSW (Command Status Wrapper) structures used by the USB BOT protocol.\r
 ///\r
 typedef struct {\r
-  UINT32              Signature;\r
-  UINT32              Tag;\r
-  UINT32              DataResidue;\r
-  UINT8               CmdStatus;\r
+  UINT32    Signature;\r
+  UINT32    Tag;\r
+  UINT32    DataResidue;\r
+  UINT8     CmdStatus;\r
 } USB_BOT_CSW;\r
 #pragma pack()\r
 \r
@@ -76,11 +76,11 @@ typedef struct {
   //\r
   // Put Interface at the first field to make it easy to distinguish BOT/CBI Protocol instance\r
   //\r
-  EFI_USB_INTERFACE_DESCRIPTOR  Interface;\r
-  EFI_USB_ENDPOINT_DESCRIPTOR   *BulkInEndpoint;\r
-  EFI_USB_ENDPOINT_DESCRIPTOR   *BulkOutEndpoint;\r
-  UINT32                        CbwTag;\r
-  EFI_USB_IO_PROTOCOL           *UsbIo;\r
+  EFI_USB_INTERFACE_DESCRIPTOR    Interface;\r
+  EFI_USB_ENDPOINT_DESCRIPTOR     *BulkInEndpoint;\r
+  EFI_USB_ENDPOINT_DESCRIPTOR     *BulkOutEndpoint;\r
+  UINT32                          CbwTag;\r
+  EFI_USB_IO_PROTOCOL             *UsbIo;\r
 } USB_BOT_PROTOCOL;\r
 \r
 /**\r
@@ -100,8 +100,8 @@ typedef struct {
 **/\r
 EFI_STATUS\r
 UsbBotInit (\r
-  IN  EFI_USB_IO_PROTOCOL       *UsbIo,\r
-  OUT VOID                      **Context OPTIONAL\r
+  IN  EFI_USB_IO_PROTOCOL  *UsbIo,\r
+  OUT VOID                 **Context OPTIONAL\r
   );\r
 \r
 /**\r
@@ -150,8 +150,8 @@ UsbBotExecCommand (
 **/\r
 EFI_STATUS\r
 UsbBotResetDevice (\r
-  IN  VOID                    *Context,\r
-  IN  BOOLEAN                 ExtendedVerification\r
+  IN  VOID     *Context,\r
+  IN  BOOLEAN  ExtendedVerification\r
   );\r
 \r
 /**\r
@@ -167,8 +167,8 @@ UsbBotResetDevice (
 **/\r
 EFI_STATUS\r
 UsbBotGetMaxLun (\r
-  IN  VOID                    *Context,\r
-  OUT UINT8                   *MaxLun\r
+  IN  VOID   *Context,\r
+  OUT UINT8  *MaxLun\r
   );\r
 \r
 /**\r
@@ -181,7 +181,7 @@ UsbBotGetMaxLun (
 **/\r
 EFI_STATUS\r
 UsbBotCleanUp (\r
-  IN  VOID                    *Context\r
+  IN  VOID  *Context\r
   );\r
 \r
 #endif\r