Implement BmDisableCursor(), BmEnableCursor() and BmPrintChar() routines
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 26s
Builds / ExectOS (i686) (push) Successful in 27s

This commit is contained in:
Rafal Kupiec 2023-12-02 23:51:22 +01:00
parent b1ef23148b
commit f0fbeadc1c
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 64 additions and 4 deletions

View File

@ -24,6 +24,34 @@ BmClearScreen()
EfiSystemTable->ConOut->ClearScreen(EfiSystemTable->ConOut); 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. * This routine initializes the EFI console.
* *
@ -40,9 +68,29 @@ BmInitializeConsole()
EfiSystemTable->ConOut->Reset(EfiSystemTable->ConOut, TRUE); EfiSystemTable->ConOut->Reset(EfiSystemTable->ConOut, TRUE);
EfiSystemTable->StdErr->Reset(EfiSystemTable->StdErr, TRUE); EfiSystemTable->StdErr->Reset(EfiSystemTable->StdErr, TRUE);
/* Clear screen */ /* Clear screen and enable cursor */
BmClearScreen(); BmClearScreen();
BmEnableCursor();
/* Enable cursor */ }
EfiSystemTable->ConOut->EnableCursor(EfiSystemTable->ConOut, TRUE);
/**
* 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);
} }

View File

@ -25,10 +25,22 @@ XTCDECL
VOID VOID
BmClearScreen(); BmClearScreen();
XTCDECL
VOID
BmDisableCursor();
XTCDECL
VOID
BmEnableCursor();
XTCDECL XTCDECL
VOID VOID
BmInitializeConsole(); BmInitializeConsole();
XTCDECL
VOID
BmPrintChar(IN USHORT Character);
XTCDECL XTCDECL
EFI_STATUS EFI_STATUS
BmStartXtLoader(IN EFI_HANDLE ImageHandle, BmStartXtLoader(IN EFI_HANDLE ImageHandle,