]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c
Add some definitions for efi event in Uefi/UefiSpec.h to follow spec.
[mirror_edk2.git] / EdkModulePkg / Bus / Usb / UsbKb / Dxe / efikey.c
index a1fd418bdeabd1303ce52d595dc76dd5f1204cc9..069e31d99171745d24e35fe3320dd193af1e7751 100644 (file)
@@ -1,18 +1,18 @@
 /*++\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
+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:\r
 \r
   EfiKey.c\r
-    \r
+\r
 Abstract:\r
 \r
   USB Keyboard Driver\r
@@ -80,18 +80,18 @@ USBKeyboardDriverBindingSupported (
   IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
   )\r
 /*++\r
-  \r
+\r
   Routine Description:\r
     Supported.\r
-    \r
+\r
   Arguments:\r
     This          - EFI_DRIVER_BINDING_PROTOCOL\r
     Controller    - Controller handle\r
-    RemainingDevicePath - EFI_DEVICE_PATH_PROTOCOL \r
+    RemainingDevicePath - EFI_DEVICE_PATH_PROTOCOL\r
   Returns:\r
     EFI_STATUS\r
-  \r
---*/ \r
+\r
+--*/\r
 {\r
   EFI_STATUS          OpenStatus;\r
   EFI_USB_IO_PROTOCOL *UsbIo;\r
@@ -111,7 +111,7 @@ USBKeyboardDriverBindingSupported (
   if (EFI_ERROR (OpenStatus)) {\r
     return OpenStatus;\r
   }\r
-   \r
+\r
   //\r
   // Use the USB I/O protocol interface to check whether the Controller is\r
   // the Keyboard controller that can be managed by this driver.\r
@@ -140,10 +140,10 @@ USBKeyboardDriverBindingStart (
   IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
   )\r
 /*++\r
-  \r
+\r
   Routine Description:\r
     Start.\r
-  \r
+\r
   Arguments:\r
     This       - EFI_DRIVER_BINDING_PROTOCOL\r
     Controller - Controller handle\r
@@ -152,8 +152,8 @@ USBKeyboardDriverBindingStart (
     EFI_SUCCESS          - Success\r
     EFI_OUT_OF_RESOURCES - Can't allocate memory\r
     EFI_UNSUPPORTED      - The Start routine fail\r
---*/       \r
-{ \r
+--*/\r
+{\r
   EFI_STATUS                    Status;\r
   EFI_USB_IO_PROTOCOL           *UsbIo;\r
   USB_KB_DEV                    *UsbKeyboardDevice;\r
@@ -164,7 +164,7 @@ USBKeyboardDriverBindingStart (
   UINT8                         PollingInterval;\r
   UINT8                         PacketSize;\r
   BOOLEAN                       Found;\r
-  \r
+\r
   UsbKeyboardDevice = NULL;\r
   Found             = FALSE;\r
 \r
@@ -283,8 +283,8 @@ USBKeyboardDriverBindingStart (
   UsbKeyboardDevice->SimpleInput.Reset          = USBKeyboardReset;\r
   UsbKeyboardDevice->SimpleInput.ReadKeyStroke  = USBKeyboardReadKeyStroke;\r
   Status = gBS->CreateEvent (\r
-                  EFI_EVENT_NOTIFY_WAIT,\r
-                  EFI_TPL_NOTIFY,\r
+                  EVT_NOTIFY_WAIT,\r
+                  TPL_NOTIFY,\r
                   USBKeyboardWaitForKey,\r
                   UsbKeyboardDevice,\r
                   &(UsbKeyboardDevice->SimpleInput.WaitForKey)\r
@@ -300,7 +300,7 @@ USBKeyboardDriverBindingStart (
           );\r
     return Status;\r
   }\r
-       \r
+\r
   //\r
   // Install simple txt in protocol interface\r
   // for the usb keyboard device.\r
@@ -328,7 +328,7 @@ USBKeyboardDriverBindingStart (
           );\r
     return Status;\r
   }\r
-    \r
+\r
   //\r
   // Reset USB Keyboard Device\r
   //\r
@@ -414,19 +414,19 @@ USBKeyboardDriverBindingStop (
   IN  EFI_HANDLE                     *ChildHandleBuffer\r
   )\r
 /*++\r
-  \r
+\r
   Routine Description:\r
     Stop.\r
-  \r
+\r
   Arguments:\r
     This              - EFI_DRIVER_BINDING_PROTOCOL\r
     Controller        - Controller handle\r
     NumberOfChildren  - Child handle number\r
-    ChildHandleBuffer - Child handle buffer \r
+    ChildHandleBuffer - Child handle buffer\r
   Returns:\r
     EFI_SUCCESS       - Success\r
-    EFI_UNSUPPORTED   - Can't support \r
---*/       \r
+    EFI_UNSUPPORTED   - Can't support\r
+--*/\r
 {\r
   EFI_STATUS                  Status;\r
   EFI_SIMPLE_TEXT_IN_PROTOCOL *SimpleInput;\r
@@ -443,7 +443,7 @@ USBKeyboardDriverBindingStop (
   if (EFI_ERROR (Status)) {\r
     return EFI_UNSUPPORTED;\r
   }\r
-  \r
+\r
   //\r
   // Get USB_KB_DEV instance.\r
   //\r
@@ -522,17 +522,17 @@ USBKeyboardReset (
 \r
   Routine Description:\r
     Implements EFI_SIMPLE_TEXT_IN_PROTOCOL.Reset() function.\r
-  \r
+\r
   Arguments:\r
     This      The EFI_SIMPLE_TEXT_IN_PROTOCOL instance.\r
     ExtendedVerification\r
               Indicates that the driver may perform a more exhaustive\r
-              verification operation of the device during reset.              \r
-    \r
-  Returns:  \r
+              verification operation of the device during reset.\r
+\r
+  Returns:\r
     EFI_SUCCESS      - Success\r
     EFI_DEVICE_ERROR - Hardware Error\r
---*/      \r
+--*/\r
 {\r
   EFI_STATUS          Status;\r
   USB_KB_DEV          *UsbKeyboardDevice;\r
@@ -563,7 +563,7 @@ USBKeyboardReset (
     UsbKeyboardDevice->CurKeyChar = 0;\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   //\r
   // Exhaustive reset\r
   //\r
@@ -587,15 +587,15 @@ USBKeyboardReadKeyStroke (
 \r
   Routine Description:\r
     Implements EFI_SIMPLE_TEXT_IN_PROTOCOL.ReadKeyStroke() function.\r
-  \r
+\r
   Arguments:\r
     This     The EFI_SIMPLE_TEXT_IN_PROTOCOL instance.\r
     Key      A pointer to a buffer that is filled in with the keystroke\r
              information for the key that was pressed.\r
-    \r
-  Returns:  \r
+\r
+  Returns:\r
     EFI_SUCCESS - Success\r
---*/       \r
+--*/\r
 {\r
   USB_KB_DEV  *UsbKeyboardDevice;\r
   EFI_STATUS  Status;\r
@@ -640,15 +640,15 @@ USBKeyboardWaitForKey (
 /*++\r
 \r
   Routine Description:\r
-    Handler function for WaitForKey event.    \r
-  \r
+    Handler function for WaitForKey event.\r
+\r
   Arguments:\r
     Event        Event to be signaled when a key is pressed.\r
     Context      Points to USB_KB_DEV instance.\r
-    \r
-  Returns:  \r
+\r
+  Returns:\r
     VOID\r
---*/       \r
+--*/\r
 {\r
   USB_KB_DEV  *UsbKeyboardDevice;\r
 \r
@@ -676,13 +676,13 @@ USBKeyboardCheckForKey (
 \r
   Routine Description:\r
     Check whether there is key pending.\r
-  \r
+\r
   Arguments:\r
     UsbKeyboardDevice    The USB_KB_DEV instance.\r
-    \r
-  Returns:  \r
+\r
+  Returns:\r
     EFI_SUCCESS  - Success\r
---*/       \r
+--*/\r
 {\r
   EFI_STATUS  Status;\r
   UINT8       KeyChar;\r