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