]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c
EmbeddedPkg: Apply uncrustify changes
[mirror_edk2.git] / EmbeddedPkg / Library / GdbSerialDebugPortLib / GdbSerialDebugPortLib.c
index d2bafcf69b607ecc4e31996697a78cf3de728728..d53a5fe47f18519cea04be6ef08d4a6bfd895568 100644 (file)
@@ -16,9 +16,8 @@
 \r
 #include <Protocol/DebugPort.h>\r
 \r
-\r
 EFI_DEBUGPORT_PROTOCOL  *gDebugPort = NULL;\r
-UINTN                   gTimeOut = 0;\r
+UINTN                   gTimeOut    = 0;\r
 \r
 /**\r
   The constructor function initializes the UART.\r
@@ -36,7 +35,7 @@ GdbSerialLibDebugPortConstructor (
   IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
 {\r
-  EFI_STATUS    Status;\r
+  EFI_STATUS  Status;\r
 \r
   Status = gBS->LocateProtocol (&gEfiDebugPortProtocolGuid, NULL, (VOID **)&gDebugPort);\r
   if (!EFI_ERROR (Status)) {\r
@@ -47,8 +46,6 @@ GdbSerialLibDebugPortConstructor (
   return Status;\r
 }\r
 \r
-\r
-\r
 /**\r
   Sets the baud rate, receive FIFO depth, transmit/receive time out, parity,\r
   data buts, and stop bits on a serial device. This call is optional as the serial\r
@@ -71,10 +68,10 @@ GdbSerialLibDebugPortConstructor (
 RETURN_STATUS\r
 EFIAPI\r
 GdbSerialInit (\r
-  IN UINT64     BaudRate,\r
-  IN UINT8      Parity,\r
-  IN UINT8      DataBits,\r
-  IN UINT8      StopBits\r
+  IN UINT64  BaudRate,\r
+  IN UINT8   Parity,\r
+  IN UINT8   DataBits,\r
+  IN UINT8   StopBits\r
   )\r
 {\r
   EFI_STATUS  Status;\r
@@ -83,7 +80,6 @@ GdbSerialInit (
   return Status;\r
 }\r
 \r
-\r
 /**\r
   Check to see if a character is available from GDB. Do not read the character as that is\r
   done via GdbGetChar().\r
@@ -105,7 +101,6 @@ GdbIsCharAvailable (
   return (Status == EFI_SUCCESS ? TRUE : FALSE);\r
 }\r
 \r
-\r
 /**\r
   Get a character from GDB. This function must be able to run in interrupt context.\r
 \r
@@ -124,13 +119,12 @@ GdbGetChar (
 \r
   do {\r
     BufferSize = sizeof (Char);\r
-    Status = gDebugPort->Read (gDebugPort, gTimeOut, &BufferSize, &Char);\r
+    Status     = gDebugPort->Read (gDebugPort, gTimeOut, &BufferSize, &Char);\r
   } while (EFI_ERROR (Status) || BufferSize != sizeof (Char));\r
 \r
   return Char;\r
 }\r
 \r
-\r
 /**\r
   Send a character to GDB. This function must be able to run in interrupt context.\r
 \r
@@ -138,11 +132,10 @@ GdbGetChar (
   @param  Char    Send a character to GDB\r
 \r
 **/\r
-\r
 VOID\r
 EFIAPI\r
 GdbPutChar (\r
-  IN  CHAR8   Char\r
+  IN  CHAR8  Char\r
   )\r
 {\r
   EFI_STATUS  Status;\r
@@ -150,7 +143,7 @@ GdbPutChar (
 \r
   do {\r
     BufferSize = sizeof (Char);\r
-    Status = gDebugPort->Write (gDebugPort, gTimeOut, &BufferSize, &Char);\r
+    Status     = gDebugPort->Write (gDebugPort, gTimeOut, &BufferSize, &Char);\r
   } while (EFI_ERROR (Status) || BufferSize != sizeof (Char));\r
 \r
   return;\r
@@ -163,19 +156,14 @@ GdbPutChar (
   @param  String    Send a string to GDB\r
 \r
 **/\r
-\r
 VOID\r
 GdbPutString (\r
   IN CHAR8  *String\r
   )\r
 {\r
- // We could performance enhance this function by calling gDebugPort->Write ()\r
 // We could performance enhance this function by calling gDebugPort->Write ()\r
   while (*String != '\0') {\r
     GdbPutChar (*String);\r
     String++;\r
   }\r
 }\r
-\r
-\r
-\r
-\r