t7.c revision 1.1.1.1.6.2 1 1.1.1.1.6.2 yamt /* $NetBSD: t7.c,v 1.1.1.1.6.2 2014/05/22 11:40:57 yamt Exp $ */
2 1.1.1.1.6.2 yamt
3 1.1.1.1.6.2 yamt #include <efi.h>
4 1.1.1.1.6.2 yamt #include <efilib.h>
5 1.1.1.1.6.2 yamt
6 1.1.1.1.6.2 yamt EFI_STATUS
7 1.1.1.1.6.2 yamt efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
8 1.1.1.1.6.2 yamt {
9 1.1.1.1.6.2 yamt EFI_INPUT_KEY efi_input_key;
10 1.1.1.1.6.2 yamt EFI_STATUS efi_status;
11 1.1.1.1.6.2 yamt
12 1.1.1.1.6.2 yamt InitializeLib(image, systab);
13 1.1.1.1.6.2 yamt
14 1.1.1.1.6.2 yamt Print(L"HelloLib application started\n");
15 1.1.1.1.6.2 yamt
16 1.1.1.1.6.2 yamt Print(L"\n\n\nHit any key to exit this image\n");
17 1.1.1.1.6.2 yamt WaitForSingleEvent(ST->ConIn->WaitForKey, 0);
18 1.1.1.1.6.2 yamt
19 1.1.1.1.6.2 yamt uefi_call_wrapper(ST->ConOut->OutputString, 2, ST->ConOut, L"\n\n");
20 1.1.1.1.6.2 yamt
21 1.1.1.1.6.2 yamt efi_status = uefi_call_wrapper(ST->ConIn->ReadKeyStroke, 2, ST->ConIn, &efi_input_key);
22 1.1.1.1.6.2 yamt
23 1.1.1.1.6.2 yamt Print(L"ScanCode: %xh UnicodeChar: %xh\n",
24 1.1.1.1.6.2 yamt efi_input_key.ScanCode, efi_input_key.UnicodeChar);
25 1.1.1.1.6.2 yamt
26 1.1.1.1.6.2 yamt return EFI_SUCCESS;
27 1.1.1.1.6.2 yamt }
28