mirror of https://github.com/acidanthera/audk.git
DuetPkg DxeIpl: Send result of PrintValue to serial port
PrintValue now uses PrintString so its result will be sent to the serial port in addition to the screen. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10951 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
dcb428da9e
commit
01b024f16b
|
@ -20,6 +20,7 @@ Revision History:
|
|||
|
||||
#include "DxeIpl.h"
|
||||
#include "SerialStatusCode.h"
|
||||
#include "Debug.h"
|
||||
|
||||
UINT8 *mCursor;
|
||||
UINT8 mHeaderIndex = 10;
|
||||
|
@ -55,16 +56,20 @@ PrintValue (
|
|||
)
|
||||
{
|
||||
UINT32 Index;
|
||||
UINT8 Char;
|
||||
CHAR8 Char;
|
||||
CHAR8 String[9];
|
||||
|
||||
for (Index = 0; Index < 8; Index++) {
|
||||
Char = (UINT8)(((Value >> ((7 - Index) * 4)) & 0x0f) + '0');
|
||||
if (Char > '9') {
|
||||
Char = (UINT8) (Char - '0' - 10 + 'A');
|
||||
}
|
||||
*mCursor = Char;
|
||||
mCursor += 2;
|
||||
String[Index] = Char;
|
||||
}
|
||||
|
||||
String[sizeof (String) - 1] = '\0';
|
||||
|
||||
PrintString (String);
|
||||
}
|
||||
|
||||
VOID
|
||||
|
@ -80,7 +85,7 @@ PrintValue64 (
|
|||
|
||||
VOID
|
||||
PrintString (
|
||||
UINT8 *String
|
||||
CHAR8 *String
|
||||
)
|
||||
{
|
||||
UINT32 Index;
|
||||
|
|
Loading…
Reference in New Issue