]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Bus / Isa / Ps2KeyboardDxe / Ps2Keyboard.h
index d0aecfb087880ba0e522975657cf7fcc9b9be2d0..3666ebc85e7a2c48b7322a48512206ffd13f7c80 100644 (file)
@@ -1,14 +1,8 @@
 /** @file\r
   PS/2 keyboard driver header file\r
 \r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
-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
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -105,6 +99,7 @@ typedef struct {
   //\r
   SCAN_CODE_QUEUE                     ScancodeQueue;\r
   EFI_KEY_QUEUE                       EfiKeyQueue;\r
+  EFI_KEY_QUEUE                       EfiKeyQueueForNotify;\r
 \r
   //\r
   // Error state\r
@@ -118,6 +113,7 @@ typedef struct {
   // Notification Function List\r
   //\r
   LIST_ENTRY                          NotifyList;\r
+  EFI_EVENT                           KeyNotifyProcessEvent;\r
 } KEYBOARD_CONSOLE_IN_DEV;\r
 \r
 #define KEYBOARD_CONSOLE_IN_DEV_FROM_THIS(a)  CR (a, KEYBOARD_CONSOLE_IN_DEV, ConIn, KEYBOARD_CONSOLE_IN_DEV_SIGNATURE)\r
@@ -268,6 +264,19 @@ KeyGetchar (
   IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn\r
   );\r
 \r
+/**\r
+  Process key notify.\r
+\r
+  @param  Event                 Indicates the event that invoke this function.\r
+  @param  Context               Indicates the calling context.\r
+**/\r
+VOID\r
+EFIAPI\r
+KeyNotifyProcessHandler (\r
+  IN  EFI_EVENT                 Event,\r
+  IN  VOID                      *Context\r
+  );\r
+\r
 /**\r
   Perform 8042 controller and keyboard Initialization.\r
   If ExtendedVerification is TRUE, do additional test for\r
@@ -285,18 +294,6 @@ InitKeyboard (
   IN BOOLEAN                     ExtendedVerification\r
   );\r
 \r
-/**\r
-  Disable the keyboard interface of the 8042 controller.\r
-\r
-  @param ConsoleIn   - the device instance\r
-\r
-  @return status of issuing disable command\r
-\r
-**/\r
-EFI_STATUS\r
-DisableKeyboard (\r
-  IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn\r
-  );\r
 \r
 /**\r
   Timer event handler: read a series of scancodes from 8042\r
@@ -480,9 +477,12 @@ KeyboardSetState (
 \r
     @param This                    - Protocol instance pointer.\r
     @param KeyData                 - A pointer to a buffer that is filled in with the keystroke\r
-                              information data for the key that was pressed.\r
+                                     information data for the key that was pressed. If KeyData.Key,\r
+                                     KeyData.KeyState.KeyToggleState and KeyData.KeyState.KeyShiftState are 0,\r
+                                     then any incomplete keystroke will trigger a notification of the KeyNotificationFunction.\r
     @param KeyNotificationFunction - Points to the function to be called when the key\r
-                              sequence is typed specified by KeyData.\r
+                                     sequence is typed specified by KeyData. This notification function\r
+                                     should be called at <=TPL_CALLBACK.\r
     @param NotifyHandle            - Points to the unique handle assigned to the registered notification.\r
 \r
     @retval EFI_SUCCESS             - The notification function was registered successfully.\r
@@ -548,4 +548,16 @@ IsKeyRegistered (
   IN EFI_KEY_DATA  *InputData\r
   );\r
 \r
+/**\r
+  Initialize the key state.\r
+\r
+  @param  ConsoleIn     The KEYBOARD_CONSOLE_IN_DEV instance.\r
+  @param  KeyState      A pointer to receive the key state information.\r
+**/\r
+VOID\r
+InitializeKeyState (\r
+  IN  KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,\r
+  OUT EFI_KEY_STATE           *KeyState\r
+  );\r
+\r
 #endif\r