-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
rtos-devbox
committed
Dec 17, 2023
1 parent
c371c44
commit db4ef06
Showing
7 changed files
with
202 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include <efi.h> | ||
#include <efilib.h> | ||
|
||
EFI_STATUS efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) | ||
{ | ||
EFI_STATUS Status; | ||
EFI_INPUT_KEY Key; | ||
|
||
/* Store the system table for future use in other functions */ | ||
ST = SystemTable; | ||
const char * test = "BEANS"; | ||
|
||
/* Say hi */ | ||
Status = ST->ConOut->OutputString(ST->ConOut, L"Hello World\n\r"); | ||
if (EFI_ERROR(Status)) | ||
return Status; | ||
|
||
/* Now wait for a keystroke before continuing, otherwise your | ||
message will flash off the screen before you see it. | ||
First, we need to empty the console input buffer to flush | ||
out any keystrokes entered before this point */ | ||
Status = ST->ConIn->Reset(ST->ConIn, FALSE); | ||
if (EFI_ERROR(Status)) | ||
return Status; | ||
|
||
/* Now wait until a key becomes available. This is a simple | ||
polling implementation. You could try and use the WaitForKey | ||
event instead if you like */ | ||
while ((Status = ST->ConIn->ReadKeyStroke(ST->ConIn, &Key)) == EFI_NOT_READY) ; | ||
|
||
return Status; | ||
} |