IntelFsp2WrapperPkg: Apply uncrustify changes
[mirror_edk2.git] / MdeModulePkg / Bus / Isa / Ps2KeyboardDxe / Ps2Keyboard.h
CommitLineData
4aa68cbc
RN
1/** @file\r
2 PS/2 keyboard driver header file\r
3\r
c9e6803c 4Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
9d510e61 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
4aa68cbc
RN
6\r
7**/\r
8\r
9#ifndef _PS2KEYBOARD_H_\r
10#define _PS2KEYBOARD_H_\r
11\r
12#include <Uefi.h>\r
13\r
14#include <Protocol/SuperIo.h>\r
15#include <Protocol/SimpleTextIn.h>\r
16#include <Protocol/SimpleTextInEx.h>\r
17#include <Protocol/DevicePath.h>\r
18#include <Protocol/Ps2Policy.h>\r
19\r
20#include <Library/IoLib.h>\r
21#include <Library/DevicePathLib.h>\r
22#include <Library/UefiDriverEntryPoint.h>\r
23#include <Library/UefiLib.h>\r
24#include <Library/UefiBootServicesTableLib.h>\r
25#include <Library/ReportStatusCodeLib.h>\r
26#include <Library/DebugLib.h>\r
27#include <Library/UefiRuntimeServicesTableLib.h>\r
28#include <Library/MemoryAllocationLib.h>\r
29#include <Library/BaseLib.h>\r
30#include <Library/BaseMemoryLib.h>\r
31#include <Library/TimerLib.h>\r
32#include <Library/PcdLib.h>\r
33\r
34//\r
35// Global Variables\r
36//\r
37extern EFI_DRIVER_BINDING_PROTOCOL gKeyboardControllerDriver;\r
38extern EFI_COMPONENT_NAME_PROTOCOL gPs2KeyboardComponentName;\r
39extern EFI_COMPONENT_NAME2_PROTOCOL gPs2KeyboardComponentName2;\r
40\r
41//\r
42// Driver Private Data\r
43//\r
44#define KEYBOARD_CONSOLE_IN_DEV_SIGNATURE SIGNATURE_32 ('k', 'k', 'e', 'y')\r
45#define KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE SIGNATURE_32 ('k', 'c', 'e', 'n')\r
46\r
47typedef struct _KEYBOARD_CONSOLE_IN_EX_NOTIFY {\r
48 UINTN Signature;\r
49 EFI_KEY_DATA KeyData;\r
50 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;\r
51 LIST_ENTRY NotifyEntry;\r
52} KEYBOARD_CONSOLE_IN_EX_NOTIFY;\r
53\r
54#define KEYBOARD_SCAN_CODE_MAX_COUNT 32\r
55typedef struct {\r
56 UINT8 Buffer[KEYBOARD_SCAN_CODE_MAX_COUNT];\r
57 UINTN Head;\r
58 UINTN Tail;\r
59} SCAN_CODE_QUEUE;\r
60\r
61#define KEYBOARD_EFI_KEY_MAX_COUNT 256\r
62typedef struct {\r
63 EFI_KEY_DATA Buffer[KEYBOARD_EFI_KEY_MAX_COUNT];\r
64 UINTN Head;\r
65 UINTN Tail;\r
66} EFI_KEY_QUEUE;\r
67\r
68typedef struct {\r
69 UINTN Signature;\r
70\r
71 EFI_HANDLE Handle;\r
72 EFI_SIMPLE_TEXT_INPUT_PROTOCOL ConIn;\r
73 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL ConInEx;\r
74\r
75 EFI_EVENT TimerEvent;\r
76\r
77 UINT32 DataRegisterAddress;\r
78 UINT32 StatusRegisterAddress;\r
79 UINT32 CommandRegisterAddress;\r
80\r
81 BOOLEAN LeftCtrl;\r
82 BOOLEAN RightCtrl;\r
83 BOOLEAN LeftAlt;\r
84 BOOLEAN RightAlt;\r
85 BOOLEAN LeftShift;\r
86 BOOLEAN RightShift;\r
87 BOOLEAN LeftLogo;\r
88 BOOLEAN RightLogo;\r
89 BOOLEAN Menu;\r
90 BOOLEAN SysReq;\r
91\r
92 BOOLEAN CapsLock;\r
93 BOOLEAN NumLock;\r
94 BOOLEAN ScrollLock;\r
95\r
96 BOOLEAN IsSupportPartialKey;\r
97 //\r
98 // Queue storing key scancodes\r
99 //\r
100 SCAN_CODE_QUEUE ScancodeQueue;\r
101 EFI_KEY_QUEUE EfiKeyQueue;\r
35dadd7c 102 EFI_KEY_QUEUE EfiKeyQueueForNotify;\r
4aa68cbc
RN
103\r
104 //\r
105 // Error state\r
106 //\r
107 BOOLEAN KeyboardErr;\r
108\r
109 EFI_UNICODE_STRING_TABLE *ControllerNameTable;\r
110\r
111 EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
112 //\r
113 // Notification Function List\r
114 //\r
115 LIST_ENTRY NotifyList;\r
35dadd7c 116 EFI_EVENT KeyNotifyProcessEvent;\r
4aa68cbc
RN
117} KEYBOARD_CONSOLE_IN_DEV;\r
118\r
119#define KEYBOARD_CONSOLE_IN_DEV_FROM_THIS(a) CR (a, KEYBOARD_CONSOLE_IN_DEV, ConIn, KEYBOARD_CONSOLE_IN_DEV_SIGNATURE)\r
120#define TEXT_INPUT_EX_KEYBOARD_CONSOLE_IN_DEV_FROM_THIS(a) \\r
121 CR (a, \\r
122 KEYBOARD_CONSOLE_IN_DEV, \\r
123 ConInEx, \\r
124 KEYBOARD_CONSOLE_IN_DEV_SIGNATURE \\r
125 )\r
126\r
127#define TABLE_END 0x0\r
128\r
129//\r
130// Driver entry point\r
131//\r
132/**\r
133 The user Entry Point for module Ps2Keyboard. The user code starts with this function.\r
134\r
135 @param[in] ImageHandle The firmware allocated handle for the EFI image.\r
136 @param[in] SystemTable A pointer to the EFI System Table.\r
137\r
138 @retval EFI_SUCCESS The entry point is executed successfully.\r
139 @retval other Some error occurs when executing this entry point.\r
140\r
141**/\r
142EFI_STATUS\r
143EFIAPI\r
144InstallPs2KeyboardDriver (\r
145 IN EFI_HANDLE ImageHandle,\r
146 IN EFI_SYSTEM_TABLE *SystemTable\r
147 );\r
148\r
149#define KEYBOARD_8042_DATA_REGISTER 0x60\r
150#define KEYBOARD_8042_STATUS_REGISTER 0x64\r
151#define KEYBOARD_8042_COMMAND_REGISTER 0x64\r
152\r
153#define KEYBOARD_KBEN 0xF4\r
154#define KEYBOARD_CMDECHO_ACK 0xFA\r
155\r
156#define KEYBOARD_MAX_TRY 256 // 256\r
157#define KEYBOARD_TIMEOUT 65536 // 0.07s\r
158#define KEYBOARD_WAITFORVALUE_TIMEOUT 1000000 // 1s\r
159#define KEYBOARD_BAT_TIMEOUT 4000000 // 4s\r
160#define KEYBOARD_TIMER_INTERVAL 200000 // 0.02s\r
161#define SCANCODE_EXTENDED0 0xE0\r
162#define SCANCODE_EXTENDED1 0xE1\r
163#define SCANCODE_CTRL_MAKE 0x1D\r
164#define SCANCODE_CTRL_BREAK 0x9D\r
165#define SCANCODE_ALT_MAKE 0x38\r
166#define SCANCODE_ALT_BREAK 0xB8\r
167#define SCANCODE_LEFT_SHIFT_MAKE 0x2A\r
168#define SCANCODE_LEFT_SHIFT_BREAK 0xAA\r
169#define SCANCODE_RIGHT_SHIFT_MAKE 0x36\r
170#define SCANCODE_RIGHT_SHIFT_BREAK 0xB6\r
171#define SCANCODE_CAPS_LOCK_MAKE 0x3A\r
172#define SCANCODE_NUM_LOCK_MAKE 0x45\r
173#define SCANCODE_SCROLL_LOCK_MAKE 0x46\r
174#define SCANCODE_DELETE_MAKE 0x53\r
175#define SCANCODE_LEFT_LOGO_MAKE 0x5B //GUI key defined in Keyboard scan code\r
176#define SCANCODE_LEFT_LOGO_BREAK 0xDB\r
177#define SCANCODE_RIGHT_LOGO_MAKE 0x5C\r
178#define SCANCODE_RIGHT_LOGO_BREAK 0xDC\r
179#define SCANCODE_MENU_MAKE 0x5D //APPS key defined in Keyboard scan code\r
180#define SCANCODE_MENU_BREAK 0xDD\r
181#define SCANCODE_SYS_REQ_MAKE 0x37\r
182#define SCANCODE_SYS_REQ_BREAK 0xB7\r
183#define SCANCODE_SYS_REQ_MAKE_WITH_ALT 0x54\r
184#define SCANCODE_SYS_REQ_BREAK_WITH_ALT 0xD4\r
185\r
186#define SCANCODE_MAX_MAKE 0x60\r
187\r
188\r
189#define KEYBOARD_STATUS_REGISTER_HAS_OUTPUT_DATA BIT0 ///< 0 - Output register has no data; 1 - Output register has data\r
190#define KEYBOARD_STATUS_REGISTER_HAS_INPUT_DATA BIT1 ///< 0 - Input register has no data; 1 - Input register has data\r
191#define KEYBOARD_STATUS_REGISTER_SYSTEM_FLAG BIT2 ///< Set to 0 after power on reset\r
192#define KEYBOARD_STATUS_REGISTER_INPUT_DATA_TYPE BIT3 ///< 0 - Data in input register is data; 1 - Data in input register is command\r
193#define KEYBOARD_STATUS_REGISTER_ENABLE_FLAG BIT4 ///< 0 - Keyboard is disable; 1 - Keyboard is enable\r
194#define KEYBOARD_STATUS_REGISTER_TRANSMIT_TIMEOUT BIT5 ///< 0 - Transmit is complete without timeout; 1 - Transmit is timeout without complete\r
195#define KEYBOARD_STATUS_REGISTER_RECEIVE_TIMEOUT BIT6 ///< 0 - Receive is complete without timeout; 1 - Receive is timeout without complete\r
196#define KEYBOARD_STATUS_REGISTER_PARITY BIT7 ///< 0 - Odd parity; 1 - Even parity\r
197\r
198#define KEYBOARD_8042_COMMAND_READ 0x20\r
199#define KEYBOARD_8042_COMMAND_WRITE 0x60\r
200#define KEYBOARD_8042_COMMAND_DISABLE_MOUSE_INTERFACE 0xA7\r
201#define KEYBOARD_8042_COMMAND_ENABLE_MOUSE_INTERFACE 0xA8\r
202#define KEYBOARD_8042_COMMAND_CONTROLLER_SELF_TEST 0xAA\r
203#define KEYBOARD_8042_COMMAND_KEYBOARD_INTERFACE_SELF_TEST 0xAB\r
204#define KEYBOARD_8042_COMMAND_DISABLE_KEYBOARD_INTERFACE 0xAD\r
205\r
206#define KEYBOARD_8048_COMMAND_CLEAR_OUTPUT_DATA 0xF4\r
207#define KEYBOARD_8048_COMMAND_RESET 0xFF\r
208#define KEYBOARD_8048_COMMAND_SELECT_SCAN_CODE_SET 0xF0\r
209\r
210#define KEYBOARD_8048_RETURN_8042_BAT_SUCCESS 0xAA\r
211#define KEYBOARD_8048_RETURN_8042_BAT_ERROR 0xFC\r
212#define KEYBOARD_8048_RETURN_8042_ACK 0xFA\r
213\r
214\r
215//\r
216// Keyboard Controller Status\r
217//\r
218#define KBC_PARE 0x80 // Parity Error\r
219#define KBC_TIM 0x40 // General Time Out\r
220\r
221//\r
222// Other functions that are used among .c files\r
223//\r
224/**\r
225 Show keyboard status lights according to\r
226 indicators in ConsoleIn.\r
227\r
228 @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV\r
229\r
230 @return status\r
231\r
232**/\r
233EFI_STATUS\r
234UpdateStatusLights (\r
235 IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn\r
236 );\r
237\r
238/**\r
239 write key to keyboard.\r
240\r
241 @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV\r
242 @param Data value wanted to be written\r
243\r
244 @retval EFI_TIMEOUT - GC_TODO: Add description for return value\r
245 @retval EFI_SUCCESS - GC_TODO: Add description for return value\r
246\r
247**/\r
248EFI_STATUS\r
249KeyboardRead (\r
250 IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,\r
251 OUT UINT8 *Data\r
252 );\r
253\r
254/**\r
255 Get scancode from scancode buffer and translate into EFI-scancode and unicode defined by EFI spec.\r
256\r
257 The function is always called in TPL_NOTIFY.\r
258\r
259 @param ConsoleIn KEYBOARD_CONSOLE_IN_DEV instance pointer\r
260\r
261**/\r
262VOID\r
263KeyGetchar (\r
264 IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn\r
265 );\r
266\r
35dadd7c
SZ
267/**\r
268 Process key notify.\r
269\r
270 @param Event Indicates the event that invoke this function.\r
271 @param Context Indicates the calling context.\r
272**/\r
273VOID\r
274EFIAPI\r
275KeyNotifyProcessHandler (\r
276 IN EFI_EVENT Event,\r
277 IN VOID *Context\r
278 );\r
279\r
4aa68cbc
RN
280/**\r
281 Perform 8042 controller and keyboard Initialization.\r
282 If ExtendedVerification is TRUE, do additional test for\r
283 the keyboard interface\r
284\r
285 @param ConsoleIn - KEYBOARD_CONSOLE_IN_DEV instance pointer\r
286 @param ExtendedVerification - indicates a thorough initialization\r
287\r
288 @retval EFI_DEVICE_ERROR Fail to init keyboard\r
289 @retval EFI_SUCCESS Success to init keyboard\r
290**/\r
291EFI_STATUS\r
292InitKeyboard (\r
293 IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,\r
294 IN BOOLEAN ExtendedVerification\r
295 );\r
296\r
4aa68cbc
RN
297\r
298/**\r
299 Timer event handler: read a series of scancodes from 8042\r
300 and put them into memory scancode buffer.\r
301 it read as much scancodes to either fill\r
302 the memory buffer or empty the keyboard buffer.\r
303 It is registered as running under TPL_NOTIFY\r
304\r
305 @param Event - The timer event\r
306 @param Context - A KEYBOARD_CONSOLE_IN_DEV pointer\r
307\r
308**/\r
309VOID\r
310EFIAPI\r
311KeyboardTimerHandler (\r
312 IN EFI_EVENT Event,\r
313 IN VOID *Context\r
314 );\r
315\r
316/**\r
317 logic reset keyboard\r
318 Implement SIMPLE_TEXT_IN.Reset()\r
319 Perform 8042 controller and keyboard initialization\r
320\r
321 @param This Pointer to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL\r
322 @param ExtendedVerification Indicate that the driver may perform a more\r
323 exhaustive verification operation of the device during\r
324 reset, now this par is ignored in this driver\r
325\r
326**/\r
327EFI_STATUS\r
328EFIAPI\r
329KeyboardEfiReset (\r
330 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,\r
331 IN BOOLEAN ExtendedVerification\r
332 );\r
333\r
334/**\r
335 Implement SIMPLE_TEXT_IN.ReadKeyStroke().\r
336 Retrieve key values for driver user.\r
337\r
338 @param This Pointer to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL\r
339 @param Key The output buffer for key value\r
340\r
341 @retval EFI_SUCCESS success to read key stroke\r
342**/\r
343EFI_STATUS\r
344EFIAPI\r
345KeyboardReadKeyStroke (\r
346 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,\r
347 OUT EFI_INPUT_KEY *Key\r
348 );\r
349\r
350/**\r
351 Event notification function for SIMPLE_TEXT_IN.WaitForKey event\r
352 Signal the event if there is key available\r
353\r
354 @param Event the event object\r
1d031e75 355 @param Context waiting context\r
4aa68cbc
RN
356\r
357**/\r
358VOID\r
359EFIAPI\r
360KeyboardWaitForKey (\r
361 IN EFI_EVENT Event,\r
362 IN VOID *Context\r
363 );\r
364\r
365/**\r
366 Read status register.\r
367\r
368 @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV\r
369\r
370 @return value in status register\r
371\r
372**/\r
373UINT8\r
374KeyReadStatusRegister (\r
375 IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn\r
376 );\r
377\r
378/**\r
379 Check whether there is Ps/2 Keyboard device in system by 0xF4 Keyboard Command\r
380 If Keyboard receives 0xF4, it will respond with 'ACK'. If it doesn't respond, the device\r
381 should not be in system.\r
382\r
383 @param[in] ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV\r
384\r
385 @retval TRUE Keyboard in System.\r
386 @retval FALSE Keyboard not in System.\r
387**/\r
388BOOLEAN\r
389EFIAPI\r
390CheckKeyboardConnect (\r
391 IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn\r
392 );\r
393\r
394/**\r
395 Event notification function for SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx event\r
396 Signal the event if there is key available\r
397\r
398 @param Event event object\r
399 @param Context waiting context\r
400\r
401**/\r
402VOID\r
403EFIAPI\r
404KeyboardWaitForKeyEx (\r
405 IN EFI_EVENT Event,\r
406 IN VOID *Context\r
407 );\r
408\r
409//\r
410// Simple Text Input Ex protocol function prototypes\r
411//\r
412\r
413/**\r
1d031e75 414 Reset the input device and optionally run diagnostics\r
4aa68cbc
RN
415\r
416 @param This - Protocol instance pointer.\r
417 @param ExtendedVerification - Driver may perform diagnostics on reset.\r
418\r
419 @retval EFI_SUCCESS - The device was reset.\r
420 @retval EFI_DEVICE_ERROR - The device is not functioning properly and could\r
421 not be reset.\r
422\r
423**/\r
424EFI_STATUS\r
425EFIAPI\r
426KeyboardEfiResetEx (\r
427 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
428 IN BOOLEAN ExtendedVerification\r
429 );\r
430\r
431/**\r
432 Reads the next keystroke from the input device. The WaitForKey Event can\r
1d031e75 433 be used to test for existence of a keystroke via WaitForEvent () call.\r
4aa68cbc
RN
434\r
435\r
436 @param This - Protocol instance pointer.\r
437 @param KeyData - A pointer to a buffer that is filled in with the keystroke\r
438 state data for the key that was pressed.\r
439\r
440 @retval EFI_SUCCESS - The keystroke information was returned.\r
1d031e75 441 @retval EFI_NOT_READY - There was no keystroke data available.\r
4aa68cbc
RN
442 @retval EFI_DEVICE_ERROR - The keystroke information was not returned due to\r
443 hardware errors.\r
444 @retval EFI_INVALID_PARAMETER - KeyData is NULL.\r
445\r
446**/\r
447EFI_STATUS\r
448EFIAPI\r
449KeyboardReadKeyStrokeEx (\r
450 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
451 OUT EFI_KEY_DATA *KeyData\r
452 );\r
453\r
454/**\r
455 Set certain state for the input device.\r
456\r
457 @param This - Protocol instance pointer.\r
458 @param KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the\r
459 state for the input device.\r
460\r
461 @retval EFI_SUCCESS - The device state was set successfully.\r
462 @retval EFI_DEVICE_ERROR - The device is not functioning correctly and could\r
463 not have the setting adjusted.\r
464 @retval EFI_UNSUPPORTED - The device does not have the ability to set its state.\r
465 @retval EFI_INVALID_PARAMETER - KeyToggleState is NULL.\r
466\r
467**/\r
468EFI_STATUS\r
469EFIAPI\r
470KeyboardSetState (\r
471 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
472 IN EFI_KEY_TOGGLE_STATE *KeyToggleState\r
473 );\r
474\r
475/**\r
476 Register a notification function for a particular keystroke for the input device.\r
477\r
478 @param This - Protocol instance pointer.\r
479 @param KeyData - A pointer to a buffer that is filled in with the keystroke\r
3652f990
DB
480 information data for the key that was pressed. If KeyData.Key,\r
481 KeyData.KeyState.KeyToggleState and KeyData.KeyState.KeyShiftState are 0,\r
482 then any incomplete keystroke will trigger a notification of the KeyNotificationFunction.\r
4aa68cbc 483 @param KeyNotificationFunction - Points to the function to be called when the key\r
3652f990
DB
484 sequence is typed specified by KeyData. This notification function\r
485 should be called at <=TPL_CALLBACK.\r
4aa68cbc
RN
486 @param NotifyHandle - Points to the unique handle assigned to the registered notification.\r
487\r
488 @retval EFI_SUCCESS - The notification function was registered successfully.\r
1d031e75 489 @retval EFI_OUT_OF_RESOURCES - Unable to allocate resources for necessary data structures.\r
4aa68cbc
RN
490 @retval EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.\r
491\r
492**/\r
493EFI_STATUS\r
494EFIAPI\r
495KeyboardRegisterKeyNotify (\r
496 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
497 IN EFI_KEY_DATA *KeyData,\r
498 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,\r
499 OUT VOID **NotifyHandle\r
500 );\r
501\r
502/**\r
503 Remove a registered notification function from a particular keystroke.\r
504\r
505 @param This - Protocol instance pointer.\r
506 @param NotificationHandle - The handle of the notification function being unregistered.\r
507\r
508\r
509 @retval EFI_SUCCESS - The notification function was unregistered successfully.\r
510 @retval EFI_INVALID_PARAMETER - The NotificationHandle is invalid.\r
511 @retval EFI_NOT_FOUND - Can not find the matching entry in database.\r
512\r
513**/\r
514EFI_STATUS\r
515EFIAPI\r
516KeyboardUnregisterKeyNotify (\r
517 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
518 IN VOID *NotificationHandle\r
519 );\r
520\r
521/**\r
522 Push one key data to the EFI key buffer.\r
523\r
524 @param Queue Pointer to instance of EFI_KEY_QUEUE.\r
525 @param KeyData The key data to push.\r
526**/\r
527VOID\r
528PushEfikeyBufTail (\r
529 IN EFI_KEY_QUEUE *Queue,\r
530 IN EFI_KEY_DATA *KeyData\r
531 );\r
532\r
533/**\r
1d031e75 534 Judge whether is a registered key\r
4aa68cbc
RN
535\r
536 @param RegsiteredData A pointer to a buffer that is filled in with the keystroke\r
537 state data for the key that was registered.\r
538 @param InputData A pointer to a buffer that is filled in with the keystroke\r
539 state data for the key that was pressed.\r
540\r
541 @retval TRUE Key be pressed matches a registered key.\r
1d031e75 542 @retval FALSE Match failed.\r
4aa68cbc
RN
543\r
544**/\r
545BOOLEAN\r
546IsKeyRegistered (\r
547 IN EFI_KEY_DATA *RegsiteredData,\r
548 IN EFI_KEY_DATA *InputData\r
549 );\r
550\r
c9e6803c
RN
551/**\r
552 Initialize the key state.\r
553\r
554 @param ConsoleIn The KEYBOARD_CONSOLE_IN_DEV instance.\r
555 @param KeyState A pointer to receive the key state information.\r
556**/\r
557VOID\r
558InitializeKeyState (\r
559 IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,\r
560 OUT EFI_KEY_STATE *KeyState\r
561 );\r
562\r
4aa68cbc 563#endif\r