main: refactor to keep the EFI headers from polluting the main namespace

This commit is contained in:
2021-11-06 23:40:50 +08:00
parent e2a2679f6d
commit 4460661bfd
13 changed files with 89 additions and 85 deletions

View File

@ -6,6 +6,7 @@
#include "../graphics/graphics.h"
#include "../driver/irq/pic/serial/serial.h"
#include "../efimain.h"
#include <string.h>
#include <stdarg.h>
@ -100,16 +101,3 @@ int io_Printf(const char *fmt, ...) {
return ret;
}
EFI_INPUT_KEY io_PauseForKeystroke() {
#ifdef HELOS_RUNTIME_QUIET
EFI_INPUT_KEY k = {0, 0};
return k;
#else
UINTN index;
EFI_INPUT_KEY key;
efiBootServices->WaitForEvent(1, &efiStdin->WaitForKey, &index);
efiSystemTable->ConIn->ReadKeyStroke(efiSystemTable->ConIn, &key);
return key;
#endif
}

View File

@ -20,8 +20,6 @@ void io_WriteConsoleASCII(const char *str);
// io_Printf is a printf() replacement, printing to WriteConsole function.
int io_Printf(const char *format, ...);
EFI_INPUT_KEY io_PauseForKeystroke();
// Debugging printing marcos
#ifndef NDEBUG