--- /dev/null
+/** @file\r
+ Simple Text In protocol from the EFI 1.0 specification.\r
+\r
+ Abstraction of a very simple input device like a keyboard or serial\r
+ terminal.\r
+\r
+ Copyright (c) 2006, Intel Corporation \r
+ All rights reserved. This program and the accompanying materials \r
+ are licensed and made available under the terms and conditions of the BSD License \r
+ which accompanies this distribution. The full text of the license may be found at \r
+ http://opensource.org/licenses/bsd-license.php \r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+ Module Name: SimpleTextIn.h\r
+\r
+**/\r
+\r
+#ifndef __SIMPLE_TEXT_IN_PROTOCOL_H__\r
+#define __SIMPLE_TEXT_IN_PROTOCOL_H__\r
+\r
+#define EFI_SIMPLE_TEXT_IN_PROTOCOL_GUID \\r
+ { \\r
+ 0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \\r
+ }\r
+\r
+#define EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID EFI_SIMPLE_TEXT_IN_PROTOCOL_GUID\r
+\r
+typedef struct _EFI_SIMPLE_TEXT_IN_PROTOCOL EFI_SIMPLE_TEXT_IN_PROTOCOL;\r
+typedef struct _EFI_SIMPLE_TEXT_IN_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL;\r
+\r
+//\r
+// Data structures\r
+//\r
+typedef struct {\r
+ UINT16 ScanCode;\r
+ CHAR16 UnicodeChar;\r
+} EFI_INPUT_KEY;\r
+\r
+//\r
+// Required unicode control chars\r
+//\r
+#define CHAR_NULL 0x0000\r
+#define CHAR_BACKSPACE 0x0008\r
+#define CHAR_TAB 0x0009\r
+#define CHAR_LINEFEED 0x000A\r
+#define CHAR_CARRIAGE_RETURN 0x000D\r
+\r
+//\r
+// EFI Scan codes\r
+//\r
+#define SCAN_NULL 0x0000\r
+#define SCAN_UP 0x0001\r
+#define SCAN_DOWN 0x0002\r
+#define SCAN_RIGHT 0x0003\r
+#define SCAN_LEFT 0x0004\r
+#define SCAN_HOME 0x0005\r
+#define SCAN_END 0x0006\r
+#define SCAN_INSERT 0x0007\r
+#define SCAN_DELETE 0x0008\r
+#define SCAN_PAGE_UP 0x0009\r
+#define SCAN_PAGE_DOWN 0x000A\r
+#define SCAN_F1 0x000B\r
+#define SCAN_F2 0x000C\r
+#define SCAN_F3 0x000D\r
+#define SCAN_F4 0x000E\r
+#define SCAN_F5 0x000F\r
+#define SCAN_F6 0x0010\r
+#define SCAN_F7 0x0011\r
+#define SCAN_F8 0x0012\r
+#define SCAN_F9 0x0013\r
+#define SCAN_F10 0x0014\r
+#define SCAN_F11 0x0015\r
+#define SCAN_F12 0x0016\r
+#define SCAN_ESC 0x0017\r
+\r
+/**\r
+ Reset the input device and optionaly run diagnostics\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ExtendedVerification Driver may perform diagnostics on reset.\r
+\r
+ @retval EFI_SUCCESS The device was reset.\r
+ @retval EFI_DEVICE_ERROR The device is not functioning properly and could not be reset.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_INPUT_RESET) (\r
+ IN EFI_SIMPLE_TEXT_IN_PROTOCOL *This,\r
+ IN BOOLEAN ExtendedVerification\r
+ )\r
+;\r
+\r
+/**\r
+ Reads the next keystroke from the input device. The WaitForKey Event can \r
+ be used to test for existance of a keystroke via WaitForEvent () call.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param Key Driver may perform diagnostics on reset.\r
+\r
+ @retval EFI_SUCCESS The keystroke information was returned.\r
+ @retval EFI_NOT_READY There was no keystroke data availiable.\r
+ @retval EFI_DEVICE_ERROR The keydtroke information was not returned due to\r
+ hardware errors.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_INPUT_READ_KEY) (\r
+ IN EFI_SIMPLE_TEXT_IN_PROTOCOL *This,\r
+ OUT EFI_INPUT_KEY *Key\r
+ )\r
+;\r
+\r
+struct _EFI_SIMPLE_TEXT_IN_PROTOCOL {\r
+ EFI_INPUT_RESET Reset;\r
+ EFI_INPUT_READ_KEY ReadKeyStroke;\r
+ EFI_EVENT WaitForKey;\r
+};\r
+\r
+extern EFI_GUID gEfiSimpleTextInProtocolGuid;\r
+\r
+#endif\r