Implement BmDisableCursor(), BmEnableCursor() and BmPrintChar() routines
This commit is contained in:
parent
b1ef23148b
commit
f0fbeadc1c
@ -24,6 +24,34 @@ BmClearScreen()
|
||||
EfiSystemTable->ConOut->ClearScreen(EfiSystemTable->ConOut);
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables the cursor on the UEFI console.
|
||||
*
|
||||
* @return This routine does not return any value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTCDECL
|
||||
VOID
|
||||
BmDisableCursor()
|
||||
{
|
||||
EfiSystemTable->ConOut->EnableCursor(EfiSystemTable->ConOut, FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables the cursor on the UEFI console.
|
||||
*
|
||||
* @return This routine does not return any value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTCDECL
|
||||
VOID
|
||||
BmEnableCursor()
|
||||
{
|
||||
EfiSystemTable->ConOut->EnableCursor(EfiSystemTable->ConOut, TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine initializes the EFI console.
|
||||
*
|
||||
@ -40,9 +68,29 @@ BmInitializeConsole()
|
||||
EfiSystemTable->ConOut->Reset(EfiSystemTable->ConOut, TRUE);
|
||||
EfiSystemTable->StdErr->Reset(EfiSystemTable->StdErr, TRUE);
|
||||
|
||||
/* Clear screen */
|
||||
/* Clear screen and enable cursor */
|
||||
BmClearScreen();
|
||||
|
||||
/* Enable cursor */
|
||||
EfiSystemTable->ConOut->EnableCursor(EfiSystemTable->ConOut, TRUE);
|
||||
BmEnableCursor();
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a character to the default EFI console.
|
||||
*
|
||||
* @param Character
|
||||
* The integer promotion of the character to be written.
|
||||
*
|
||||
* @return This routine does not return any value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTCDECL
|
||||
VOID
|
||||
BmPrintChar(IN USHORT Character)
|
||||
{
|
||||
USHORT Buffer[2];
|
||||
|
||||
/* Write character to the screen console */
|
||||
Buffer[0] = Character;
|
||||
Buffer[1] = 0;
|
||||
EfiSystemTable->ConOut->OutputString(EfiSystemTable->ConOut, Buffer);
|
||||
}
|
||||
|
@ -25,10 +25,22 @@ XTCDECL
|
||||
VOID
|
||||
BmClearScreen();
|
||||
|
||||
XTCDECL
|
||||
VOID
|
||||
BmDisableCursor();
|
||||
|
||||
XTCDECL
|
||||
VOID
|
||||
BmEnableCursor();
|
||||
|
||||
XTCDECL
|
||||
VOID
|
||||
BmInitializeConsole();
|
||||
|
||||
XTCDECL
|
||||
VOID
|
||||
BmPrintChar(IN USHORT Character);
|
||||
|
||||
XTCDECL
|
||||
EFI_STATUS
|
||||
BmStartXtLoader(IN EFI_HANDLE ImageHandle,
|
||||
|
Loading…
Reference in New Issue
Block a user