summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg/Library/GdbSerialDebugPortLib
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:53:56 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commite7108d0e9655b1795c94ac372b0449f28dd907df (patch)
treeb153716589979b9e42e9b85281ff8b7511ba272f /EmbeddedPkg/Library/GdbSerialDebugPortLib
parent731c67e1d77b7741a91762d17659fc9fbcb9e305 (diff)
downloadedk2-e7108d0e9655b1795c94ac372b0449f28dd907df.tar.gz
edk2-e7108d0e9655b1795c94ac372b0449f28dd907df.tar.bz2
edk2-e7108d0e9655b1795c94ac372b0449f28dd907df.zip
EmbeddedPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the EmbeddedPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Andrew Fish <afish@apple.com>
Diffstat (limited to 'EmbeddedPkg/Library/GdbSerialDebugPortLib')
-rw-r--r--EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c b/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c
index d2bafcf69b..d53a5fe47f 100644
--- a/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c
+++ b/EmbeddedPkg/Library/GdbSerialDebugPortLib/GdbSerialDebugPortLib.c
@@ -16,9 +16,8 @@
#include <Protocol/DebugPort.h>
-
EFI_DEBUGPORT_PROTOCOL *gDebugPort = NULL;
-UINTN gTimeOut = 0;
+UINTN gTimeOut = 0;
/**
The constructor function initializes the UART.
@@ -36,7 +35,7 @@ GdbSerialLibDebugPortConstructor (
IN EFI_SYSTEM_TABLE *SystemTable
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
Status = gBS->LocateProtocol (&gEfiDebugPortProtocolGuid, NULL, (VOID **)&gDebugPort);
if (!EFI_ERROR (Status)) {
@@ -47,8 +46,6 @@ GdbSerialLibDebugPortConstructor (
return Status;
}
-
-
/**
Sets the baud rate, receive FIFO depth, transmit/receive time out, parity,
data buts, and stop bits on a serial device. This call is optional as the serial
@@ -71,10 +68,10 @@ GdbSerialLibDebugPortConstructor (
RETURN_STATUS
EFIAPI
GdbSerialInit (
- IN UINT64 BaudRate,
- IN UINT8 Parity,
- IN UINT8 DataBits,
- IN UINT8 StopBits
+ IN UINT64 BaudRate,
+ IN UINT8 Parity,
+ IN UINT8 DataBits,
+ IN UINT8 StopBits
)
{
EFI_STATUS Status;
@@ -83,7 +80,6 @@ GdbSerialInit (
return Status;
}
-
/**
Check to see if a character is available from GDB. Do not read the character as that is
done via GdbGetChar().
@@ -105,7 +101,6 @@ GdbIsCharAvailable (
return (Status == EFI_SUCCESS ? TRUE : FALSE);
}
-
/**
Get a character from GDB. This function must be able to run in interrupt context.
@@ -124,13 +119,12 @@ GdbGetChar (
do {
BufferSize = sizeof (Char);
- Status = gDebugPort->Read (gDebugPort, gTimeOut, &BufferSize, &Char);
+ Status = gDebugPort->Read (gDebugPort, gTimeOut, &BufferSize, &Char);
} while (EFI_ERROR (Status) || BufferSize != sizeof (Char));
return Char;
}
-
/**
Send a character to GDB. This function must be able to run in interrupt context.
@@ -138,11 +132,10 @@ GdbGetChar (
@param Char Send a character to GDB
**/
-
VOID
EFIAPI
GdbPutChar (
- IN CHAR8 Char
+ IN CHAR8 Char
)
{
EFI_STATUS Status;
@@ -150,7 +143,7 @@ GdbPutChar (
do {
BufferSize = sizeof (Char);
- Status = gDebugPort->Write (gDebugPort, gTimeOut, &BufferSize, &Char);
+ Status = gDebugPort->Write (gDebugPort, gTimeOut, &BufferSize, &Char);
} while (EFI_ERROR (Status) || BufferSize != sizeof (Char));
return;
@@ -163,19 +156,14 @@ GdbPutChar (
@param String Send a string to GDB
**/
-
VOID
GdbPutString (
IN CHAR8 *String
)
{
- // We could performance enhance this function by calling gDebugPort->Write ()
+ // We could performance enhance this function by calling gDebugPort->Write ()
while (*String != '\0') {
GdbPutChar (*String);
String++;
}
}
-
-
-
-