]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h
Remove extra #includes where possible to make build more efficient
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Isa / Ps2KeyboardDxe / Ps2Keyboard.h
CommitLineData
f713c4fe 1/** @file\r
f3d1e940 2 PS/2 keyboard driver header file\r
05fbd06d 3\r
f713c4fe 4Copyright (c) 2006 - 2009, Intel Corporation\r
df0dcb5e 5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
05fbd06d 12\r
13**/\r
14\r
f713c4fe 15#ifndef _PS2KEYBOARD_H_\r
16#define _PS2KEYBOARD_H_\r
05fbd06d 17\r
79bc7a89 18#include <FrameworkDxe.h>\r
752f2e26 19\r
20#include <Protocol/SimpleTextIn.h>\r
f3d1e940 21#include <Protocol/SimpleTextInEx.h>\r
752f2e26 22#include <Protocol/IsaIo.h>\r
23#include <Protocol/DevicePath.h>\r
24#include <Protocol/Ps2Policy.h>\r
25\r
26#include <Library/UefiDriverEntryPoint.h>\r
27#include <Library/UefiLib.h>\r
28#include <Library/UefiBootServicesTableLib.h>\r
29#include <Library/ReportStatusCodeLib.h>\r
30#include <Library/DebugLib.h>\r
31#include <Library/UefiRuntimeServicesTableLib.h>\r
32#include <Library/MemoryAllocationLib.h>\r
f3d1e940 33#include <Library/BaseLib.h>\r
34#include <Library/BaseMemoryLib.h>\r
b6763e03 35#include <Library/TimerLib.h>\r
05fbd06d 36\r
9f6531d1 37//\r
38// Global Variables\r
39//\r
40extern EFI_DRIVER_BINDING_PROTOCOL gKeyboardControllerDriver;\r
41extern EFI_COMPONENT_NAME_PROTOCOL gPs2KeyboardComponentName;\r
42extern EFI_COMPONENT_NAME2_PROTOCOL gPs2KeyboardComponentName2;\r
43\r
05fbd06d 44//\r
45// Driver Private Data\r
46//\r
47#define KEYBOARD_BUFFER_MAX_COUNT 32\r
f02bd376 48#define KEYBOARD_CONSOLE_IN_DEV_SIGNATURE SIGNATURE_32 ('k', 'k', 'e', 'y')\r
49#define KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE SIGNATURE_32 ('k', 'c', 'e', 'n')\r
f3d1e940 50\r
51typedef struct _KEYBOARD_CONSOLE_IN_EX_NOTIFY {\r
52 UINTN Signature;\r
53 EFI_HANDLE NotifyHandle;\r
54 EFI_KEY_DATA KeyData;\r
55 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;\r
56 LIST_ENTRY NotifyEntry;\r
57} KEYBOARD_CONSOLE_IN_EX_NOTIFY;\r
58\r
05fbd06d 59\r
60typedef struct {\r
61 UINTN Signature;\r
62\r
63 EFI_HANDLE Handle;\r
64 EFI_SIMPLE_TEXT_INPUT_PROTOCOL ConIn;\r
f3d1e940 65 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL ConInEx;\r
05fbd06d 66 EFI_ISA_IO_PROTOCOL *IsaIo;\r
67\r
68 EFI_EVENT TimerEvent;\r
69\r
70 UINT32 DataRegisterAddress;\r
71 UINT32 StatusRegisterAddress;\r
72 UINT32 CommandRegisterAddress;\r
73\r
74 EFI_INPUT_KEY Key;\r
f3d1e940 75 EFI_KEY_STATE KeyState;\r
76\r
77 BOOLEAN LeftShift;\r
78 BOOLEAN RightShift; \r
79 BOOLEAN LeftLogo;\r
80 BOOLEAN RightLogo;\r
81 BOOLEAN Menu;\r
82 BOOLEAN SysReq;\r
05fbd06d 83\r
84 BOOLEAN Ctrl;\r
85 BOOLEAN Alt;\r
86 BOOLEAN Shift;\r
87 BOOLEAN CapsLock;\r
88 BOOLEAN NumLock;\r
89 BOOLEAN ScrollLock;\r
90\r
91 //\r
92 // Buffer storing key scancodes\r
93 //\r
94 UINT8 ScancodeBuf[KEYBOARD_BUFFER_MAX_COUNT];\r
95 UINT32 ScancodeBufStartPos;\r
96 UINT32 ScancodeBufEndPos;\r
97 UINT32 ScancodeBufCount;\r
98\r
99 //\r
100 // Indicators of the key pressing state, used in detecting Alt+Ctrl+Del\r
101 //\r
102 BOOLEAN Ctrled;\r
103 BOOLEAN Alted;\r
104\r
105 //\r
106 // Error state\r
107 //\r
108 BOOLEAN KeyboardErr;\r
109\r
110 EFI_UNICODE_STRING_TABLE *ControllerNameTable;\r
111\r
112 EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
f3d1e940 113 //\r
114 // Notification Function List\r
115 //\r
116 LIST_ENTRY NotifyList;\r
05fbd06d 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
f3d1e940 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
05fbd06d 126\r
127#define TABLE_END 0x0\r
128\r
05fbd06d 129//\r
130// Driver entry point\r
131//\r
bcd70414 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
05fbd06d 142EFI_STATUS\r
f3d1e940 143EFIAPI\r
05fbd06d 144InstallPs2KeyboardDriver (\r
145 IN EFI_HANDLE ImageHandle,\r
146 IN EFI_SYSTEM_TABLE *SystemTable\r
ed66e1bc 147 );\r
05fbd06d 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
05f89b17 156#define KEYBOARD_MAX_TRY 256 // 256\r
05fbd06d 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_EXTENDED 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
f3d1e940 174#define SCANCODE_LEFT_LOGO_MAKE 0x5B //GUI key defined in Keyboard scan code\r
175#define SCANCODE_LEFT_LOGO_BREAK 0xDB\r
176#define SCANCODE_RIGHT_LOGO_MAKE 0x5C\r
177#define SCANCODE_RIGHT_LOGO_BREAK 0xDC\r
178#define SCANCODE_MENU_MAKE 0x5D //APPS key defined in Keyboard scan code \r
179#define SCANCODE_MENU_BREAK 0xDD\r
180#define SCANCODE_SYS_REQ_MAKE 0x37\r
181#define SCANCODE_MAX_MAKE 0x60\r
05fbd06d 182\r
b6763e03 183#define KEYBOARD_STATUS_REGISTER_HAS_OUTPUT_DATA BIT0 ///< 0 - Output register has no data; 1 - Output register has data\r
184#define KEYBOARD_STATUS_REGISTER_HAS_INPUT_DATA BIT1 ///< 0 - Input register has no data; 1 - Input register has data\r
185#define KEYBOARD_STATUS_REGISTER_SYSTEM_FLAG BIT2 ///< Set to 0 after power on reset\r
186#define KEYBOARD_STATUS_REGISTER_INPUT_DATA_TYPE BIT3 ///< 0 - Data in input register is data; 1 - Data in input register is command\r
187#define KEYBOARD_STATUS_REGISTER_ENABLE_FLAG BIT4 ///< 0 - Keyboard is disable; 1 - Keyboard is enable\r
188#define KEYBOARD_STATUS_REGISTER_TRANSMIT_TIMEOUT BIT5 ///< 0 - Transmit is complete without timeout; 1 - Transmit is timeout without complete\r
189#define KEYBOARD_STATUS_REGISTER_RECEIVE_TIMEOUT BIT6 ///< 0 - Receive is complete without timeout; 1 - Receive is timeout without complete\r
190#define KEYBOARD_STATUS_REGISTER_PARITY BIT7 ///< 0 - Odd parity; 1 - Even parity\r
191\r
192#define KEYBOARD_8042_COMMAND_READ 0x20\r
193#define KEYBOARD_8042_COMMAND_WRITE 0x60\r
194#define KEYBOARD_8042_COMMAND_DISABLE_MOUSE_INTERFACE 0xA7\r
195#define KEYBOARD_8042_COMMAND_ENABLE_MOUSE_INTERFACE 0xA8\r
196#define KEYBOARD_8042_COMMAND_CONTROLLER_SELF_TEST 0xAA\r
197#define KEYBOARD_8042_COMMAND_KEYBOARD_INTERFACE_SELF_TEST 0xAB\r
198#define KEYBOARD_8042_COMMAND_DISABLE_KEYBOARD_INTERFACE 0xAD\r
199\r
200#define KEYBOARD_8048_COMMAND_CLEAR_OUTPUT_DATA 0xF4\r
201#define KEYBOARD_8048_COMMAND_RESET 0xFF\r
202#define KEYBOARD_8048_COMMAND_SELECT_SCAN_CODE_SET 0xF0\r
203\r
204#define KEYBOARD_8048_RETURN_8042_BAT_SUCCESS 0xAA\r
205#define KEYBOARD_8048_RETURN_8042_BAT_ERROR 0xFC\r
206#define KEYBOARD_8048_RETURN_8042_ACK 0xFA\r
207\r
208\r
007c18f5 209//\r
210// Keyboard Controller Status\r
211//\r
212#define KBC_PARE 0x80 // Parity Error\r
213#define KBC_TIM 0x40 // General Time Out\r
214\r
05fbd06d 215//\r
216// Other functions that are used among .c files\r
217//\r
bcd70414 218/**\r
219 Show keyboard status lights according to\r
220 indicators in ConsoleIn.\r
221\r
222 @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV\r
223 \r
224 @return status\r
f3d1e940 225\r
bcd70414 226**/\r
f3d1e940 227EFI_STATUS\r
228UpdateStatusLights (\r
229 IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn\r
ed66e1bc 230 );\r
f3d1e940 231\r
bcd70414 232/**\r
f713c4fe 233 write key to keyboard.\r
f3d1e940 234\r
bcd70414 235 @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV\r
236 @param Data value wanted to be written\r
f3d1e940 237\r
bcd70414 238 @retval EFI_TIMEOUT - GC_TODO: Add description for return value\r
239 @retval EFI_SUCCESS - GC_TODO: Add description for return value\r
f3d1e940 240\r
bcd70414 241**/\r
05fbd06d 242EFI_STATUS\r
243KeyboardRead (\r
244 IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,\r
245 OUT UINT8 *Data\r
ed66e1bc 246 );\r
05fbd06d 247\r
bcd70414 248/**\r
249 Get scancode from scancode buffer\r
250 and translate into EFI-scancode and unicode defined by EFI spec\r
251 The function is always called in TPL_NOTIFY\r
05fbd06d 252\r
bcd70414 253 @param ConsoleIn KEYBOARD_CONSOLE_IN_DEV instance pointer\r
05fbd06d 254\r
bcd70414 255 @retval EFI_NOT_READY - Input from console not ready yet.\r
256 @retval EFI_SUCCESS - Function executed successfully.\r
05fbd06d 257\r
bcd70414 258**/\r
05fbd06d 259EFI_STATUS\r
260KeyGetchar (\r
261 IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn\r
ed66e1bc 262 );\r
05fbd06d 263\r
bcd70414 264/**\r
f713c4fe 265 Perform 8042 controller and keyboard Initialization.\r
bcd70414 266 If ExtendedVerification is TRUE, do additional test for\r
267 the keyboard interface\r
05fbd06d 268\r
bcd70414 269 @param ConsoleIn - KEYBOARD_CONSOLE_IN_DEV instance pointer\r
270 @param ExtendedVerification - indicates a thorough initialization\r
05fbd06d 271\r
bcd70414 272 @retval EFI_DEVICE_ERROR Fail to init keyboard\r
273 @retval EFI_SUCCESS Success to init keyboard\r
274**/\r
05fbd06d 275EFI_STATUS\r
276InitKeyboard (\r
277 IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,\r
278 IN BOOLEAN ExtendedVerification\r
ed66e1bc 279 );\r
05fbd06d 280\r
bcd70414 281/**\r
f713c4fe 282 Disable the keyboard interface of the 8042 controller.\r
05fbd06d 283\r
bcd70414 284 @param ConsoleIn - the device instance\r
05fbd06d 285\r
bcd70414 286 @return status of issuing disable command\r
05fbd06d 287\r
bcd70414 288**/\r
05fbd06d 289EFI_STATUS\r
290DisableKeyboard (\r
291 IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn\r
ed66e1bc 292 );\r
05fbd06d 293\r
bcd70414 294/**\r
295 Timer event handler: read a series of scancodes from 8042\r
296 and put them into memory scancode buffer.\r
297 it read as much scancodes to either fill\r
298 the memory buffer or empty the keyboard buffer.\r
299 It is registered as running under TPL_NOTIFY\r
05fbd06d 300\r
bcd70414 301 @param Event - The timer event\r
302 @param Context - A KEYBOARD_CONSOLE_IN_DEV pointer\r
05fbd06d 303\r
bcd70414 304**/\r
05fbd06d 305VOID\r
306EFIAPI\r
307KeyboardTimerHandler (\r
308 IN EFI_EVENT Event,\r
309 IN VOID *Context\r
ed66e1bc 310 );\r
05fbd06d 311\r
bcd70414 312/**\r
313 logic reset keyboard\r
314 Implement SIMPLE_TEXT_IN.Reset()\r
315 Perform 8042 controller and keyboard initialization\r
05fbd06d 316\r
bcd70414 317 @param This Pointer to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL\r
318 @param ExtendedVerification Indicate that the driver may perform a more \r
319 exhaustive verification operation of the device during \r
320 reset, now this par is ignored in this driver \r
05fbd06d 321\r
bcd70414 322**/\r
05fbd06d 323EFI_STATUS\r
324EFIAPI\r
325KeyboardEfiReset (\r
326 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,\r
327 IN BOOLEAN ExtendedVerification\r
ed66e1bc 328 );\r
05fbd06d 329\r
bcd70414 330/**\r
331 Implement SIMPLE_TEXT_IN.ReadKeyStroke().\r
332 Retrieve key values for driver user.\r
05fbd06d 333\r
bcd70414 334 @param This Pointer to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL\r
335 @param Key The output buffer for key value \r
05fbd06d 336\r
bcd70414 337 @retval EFI_SUCCESS success to read key stroke\r
338**/\r
05fbd06d 339EFI_STATUS\r
340EFIAPI\r
341KeyboardReadKeyStroke (\r
342 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,\r
343 OUT EFI_INPUT_KEY *Key\r
ed66e1bc 344 );\r
05fbd06d 345\r
bcd70414 346/**\r
347 Event notification function for SIMPLE_TEXT_IN.WaitForKey event\r
348 Signal the event if there is key available\r
05fbd06d 349\r
bcd70414 350 @param Event the event object\r
351 @param Context waitting context\r
05fbd06d 352\r
bcd70414 353**/\r
05fbd06d 354VOID\r
355EFIAPI\r
356KeyboardWaitForKey (\r
357 IN EFI_EVENT Event,\r
358 IN VOID *Context\r
ed66e1bc 359 );\r
05fbd06d 360\r
bcd70414 361/**\r
f713c4fe 362 Read status register.\r
05fbd06d 363\r
bcd70414 364 @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV\r
05fbd06d 365\r
bcd70414 366 @return value in status register\r
05fbd06d 367\r
bcd70414 368**/\r
05fbd06d 369UINT8\r
370KeyReadStatusRegister (\r
371 IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn\r
ed66e1bc 372 );\r
05fbd06d 373\r
374/**\r
375 Check whether there is Ps/2 Keyboard device in system by 0xF4 Keyboard Command\r
376 If Keyboard receives 0xF4, it will respond with 'ACK'. If it doesn't respond, the device\r
377 should not be in system.\r
378\r
f713c4fe 379 @param[in] ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV\r
05fbd06d 380\r
f3d1e940 381 @retval TRUE Keyboard in System.\r
382 @retval FALSE Keyboard not in System.\r
05fbd06d 383**/\r
384BOOLEAN\r
385EFIAPI\r
386CheckKeyboardConnect (\r
387 IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn\r
ed66e1bc 388 );\r
f3d1e940 389\r
bcd70414 390/**\r
391 Event notification function for SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx event\r
392 Signal the event if there is key available\r
393\r
394 @param Event event object\r
395 @param Context waiting context\r
396\r
397**/\r
f3d1e940 398VOID\r
399EFIAPI\r
400KeyboardWaitForKeyEx (\r
401 IN EFI_EVENT Event,\r
402 IN VOID *Context\r
ed66e1bc 403 ); \r
f3d1e940 404\r
405//\r
406// Simple Text Input Ex protocol function prototypes\r
407//\r
408\r
bcd70414 409/**\r
410 Reset the input device and optionaly run diagnostics\r
411\r
412 @param This - Protocol instance pointer.\r
413 @param ExtendedVerification - Driver may perform diagnostics on reset.\r
414\r
415 @retval EFI_SUCCESS - The device was reset.\r
416 @retval EFI_DEVICE_ERROR - The device is not functioning properly and could \r
417 not be reset.\r
418\r
419**/\r
f3d1e940 420EFI_STATUS\r
421EFIAPI\r
422KeyboardEfiResetEx (\r
423 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
424 IN BOOLEAN ExtendedVerification\r
ed66e1bc 425 );\r
f3d1e940 426\r
bcd70414 427/**\r
428 Reads the next keystroke from the input device. The WaitForKey Event can \r
429 be used to test for existance of a keystroke via WaitForEvent () call.\r
f3d1e940 430\r
f3d1e940 431\r
bcd70414 432 @param This - Protocol instance pointer.\r
433 @param KeyData - A pointer to a buffer that is filled in with the keystroke \r
434 state data for the key that was pressed.\r
f3d1e940 435\r
bcd70414 436 @retval EFI_SUCCESS - The keystroke information was returned.\r
437 @retval EFI_NOT_READY - There was no keystroke data availiable.\r
438 @retval EFI_DEVICE_ERROR - The keystroke information was not returned due to \r
439 hardware errors.\r
440 @retval EFI_INVALID_PARAMETER - KeyData is NULL. \r
f3d1e940 441\r
bcd70414 442**/\r
f3d1e940 443EFI_STATUS\r
444EFIAPI\r
445KeyboardReadKeyStrokeEx (\r
446 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
447 OUT EFI_KEY_DATA *KeyData\r
ed66e1bc 448 );\r
f3d1e940 449\r
bcd70414 450/**\r
451 Set certain state for the input device.\r
f3d1e940 452\r
bcd70414 453 @param This - Protocol instance pointer.\r
454 @param KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the \r
455 state for the input device.\r
f3d1e940 456\r
bcd70414 457 @retval EFI_SUCCESS - The device state was set successfully.\r
458 @retval EFI_DEVICE_ERROR - The device is not functioning correctly and could \r
459 not have the setting adjusted.\r
460 @retval EFI_UNSUPPORTED - The device does not have the ability to set its state.\r
461 @retval EFI_INVALID_PARAMETER - KeyToggleState is NULL. \r
f3d1e940 462\r
bcd70414 463**/\r
f3d1e940 464EFI_STATUS\r
465EFIAPI\r
466KeyboardSetState (\r
467 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
468 IN EFI_KEY_TOGGLE_STATE *KeyToggleState\r
ed66e1bc 469 );\r
f3d1e940 470\r
bcd70414 471/**\r
472 Register a notification function for a particular keystroke for the input device.\r
473\r
474 @param This - Protocol instance pointer.\r
475 @param KeyData - A pointer to a buffer that is filled in with the keystroke \r
476 information data for the key that was pressed.\r
477 @param KeyNotificationFunction - Points to the function to be called when the key \r
478 sequence is typed specified by KeyData. \r
479 @param NotifyHandle - Points to the unique handle assigned to the registered notification. \r
480\r
481 @retval EFI_SUCCESS - The notification function was registered successfully.\r
482 @retval EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.\r
483 @retval EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL. \r
484 \r
485**/ \r
f3d1e940 486EFI_STATUS\r
487EFIAPI\r
488KeyboardRegisterKeyNotify (\r
489 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
490 IN EFI_KEY_DATA *KeyData,\r
491 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,\r
492 OUT EFI_HANDLE *NotifyHandle\r
ed66e1bc 493 );\r
f3d1e940 494\r
bcd70414 495/**\r
496 Remove a registered notification function from a particular keystroke.\r
f3d1e940 497\r
bcd70414 498 @param This - Protocol instance pointer. \r
499 @param NotificationHandle - The handle of the notification function being unregistered.\r
f3d1e940 500\r
bcd70414 501 \r
502 @retval EFI_SUCCESS - The notification function was unregistered successfully.\r
503 @retval EFI_INVALID_PARAMETER - The NotificationHandle is invalid.\r
504 @retval EFI_NOT_FOUND - Can not find the matching entry in database. \r
f3d1e940 505 \r
bcd70414 506**/ \r
f3d1e940 507EFI_STATUS\r
508EFIAPI\r
509KeyboardUnregisterKeyNotify (\r
510 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
511 IN EFI_HANDLE NotificationHandle\r
ed66e1bc 512 );\r
f3d1e940 513\r
05fbd06d 514#endif\r