]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2004, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
5 | are licensed and made available under the terms and conditions of the BSD License \r | |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | SimpleTextIn.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | Simple Text In protocol from the EFI 1.0 specification.\r | |
19 | \r | |
20 | Abstraction of a very simple input device like a keyboard or serial\r | |
21 | terminal.\r | |
22 | \r | |
23 | --*/\r | |
24 | \r | |
25 | #ifndef _SIMPLE_TEXT_IN_H_\r | |
26 | #define _SIMPLE_TEXT_IN_H_\r | |
27 | \r | |
28 | #define EFI_SIMPLE_TEXT_IN_PROTOCOL_GUID \\r | |
29 | { \\r | |
30 | 0x387477c1, 0x69c7, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \\r | |
31 | }\r | |
32 | \r | |
33 | EFI_FORWARD_DECLARATION (EFI_SIMPLE_TEXT_IN_PROTOCOL);\r | |
34 | \r | |
35 | //\r | |
36 | // Data structures\r | |
37 | //\r | |
38 | typedef struct {\r | |
39 | UINT16 ScanCode;\r | |
40 | CHAR16 UnicodeChar;\r | |
41 | } EFI_INPUT_KEY;\r | |
42 | \r | |
43 | //\r | |
44 | // Required unicode control chars\r | |
45 | //\r | |
46 | #define CHAR_NULL 0x0000\r | |
47 | #define CHAR_BACKSPACE 0x0008\r | |
48 | #define CHAR_TAB 0x0009\r | |
49 | #define CHAR_LINEFEED 0x000A\r | |
50 | #define CHAR_CARRIAGE_RETURN 0x000D\r | |
51 | \r | |
52 | //\r | |
53 | // EFI Scan codes\r | |
54 | //\r | |
55 | #define SCAN_NULL 0x0000\r | |
56 | #define SCAN_UP 0x0001\r | |
57 | #define SCAN_DOWN 0x0002\r | |
58 | #define SCAN_RIGHT 0x0003\r | |
59 | #define SCAN_LEFT 0x0004\r | |
60 | #define SCAN_HOME 0x0005\r | |
61 | #define SCAN_END 0x0006\r | |
62 | #define SCAN_INSERT 0x0007\r | |
63 | #define SCAN_DELETE 0x0008\r | |
64 | #define SCAN_PAGE_UP 0x0009\r | |
65 | #define SCAN_PAGE_DOWN 0x000A\r | |
66 | #define SCAN_F1 0x000B\r | |
67 | #define SCAN_F2 0x000C\r | |
68 | #define SCAN_F3 0x000D\r | |
69 | #define SCAN_F4 0x000E\r | |
70 | #define SCAN_F5 0x000F\r | |
71 | #define SCAN_F6 0x0010\r | |
72 | #define SCAN_F7 0x0011\r | |
73 | #define SCAN_F8 0x0012\r | |
74 | #define SCAN_F9 0x0013\r | |
75 | #define SCAN_F10 0x0014\r | |
76 | #define SCAN_F11 0x0015\r | |
77 | #define SCAN_F12 0x0016\r | |
78 | #define SCAN_ESC 0x0017\r | |
79 | \r | |
80 | typedef\r | |
81 | EFI_STATUS\r | |
82 | (EFIAPI *EFI_INPUT_RESET) (\r | |
83 | IN EFI_SIMPLE_TEXT_IN_PROTOCOL * This,\r | |
84 | IN BOOLEAN ExtendedVerification\r | |
85 | )\r | |
86 | /*++\r | |
87 | \r | |
88 | Routine Description:\r | |
89 | Reset the input device and optionaly run diagnostics\r | |
90 | \r | |
91 | Arguments:\r | |
92 | This - Protocol instance pointer.\r | |
93 | ExtendedVerification - Driver may perform diagnostics on reset.\r | |
94 | \r | |
95 | Returns:\r | |
96 | EFI_SUCCESS - The device was reset.\r | |
97 | EFI_DEVICE_ERROR - The device is not functioning properly and could \r | |
98 | not be reset.\r | |
99 | \r | |
100 | --*/\r | |
101 | ;\r | |
102 | \r | |
103 | typedef\r | |
104 | EFI_STATUS\r | |
105 | (EFIAPI *EFI_INPUT_READ_KEY) (\r | |
106 | IN EFI_SIMPLE_TEXT_IN_PROTOCOL * This,\r | |
107 | OUT EFI_INPUT_KEY * Key\r | |
108 | )\r | |
109 | /*++\r | |
110 | \r | |
111 | Routine Description:\r | |
112 | Reads the next keystroke from the input device. The WaitForKey Event can \r | |
113 | be used to test for existance of a keystroke via WaitForEvent () call.\r | |
114 | \r | |
115 | Arguments:\r | |
116 | This - Protocol instance pointer.\r | |
117 | Key - Driver may perform diagnostics on reset.\r | |
118 | \r | |
119 | Returns:\r | |
120 | EFI_SUCCESS - The keystroke information was returned.\r | |
121 | EFI_NOT_READY - There was no keystroke data availiable.\r | |
122 | EFI_DEVICE_ERROR - The keydtroke information was not returned due to \r | |
123 | hardware errors.\r | |
124 | \r | |
125 | --*/\r | |
126 | ;\r | |
127 | \r | |
e5bce275 | 128 | struct _EFI_SIMPLE_TEXT_IN_PROTOCOL {\r |
3eb9473e | 129 | EFI_INPUT_RESET Reset;\r |
130 | EFI_INPUT_READ_KEY ReadKeyStroke;\r | |
131 | EFI_EVENT WaitForKey;\r | |
e5bce275 | 132 | };\r |
3eb9473e | 133 | \r |
134 | extern EFI_GUID gEfiSimpleTextInProtocolGuid;\r | |
135 | \r | |
136 | #endif\r |