-/**@file\r
+/** @file\r
\r
PS/2 Keyboard driver. Routines that interacts with callers,\r
conforming to EFI driver model\r
\r
-Copyright (c) 2006 - 2007, Intel Corporation\r
+Copyright (c) 2006 - 2009, 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
//\r
// Function prototypes\r
//\r
+/**\r
+ Test controller is a keyboard Controller.\r
+ \r
+ @param This Pointer of EFI_DRIVER_BINDING_PROTOCOL\r
+ @param Controller driver's controller\r
+ @param RemainingDevicePath children device path\r
+ \r
+ @retval EFI_UNSUPPORTED controller is not floppy disk\r
+ @retval EFI_SUCCESS controller is floppy disk\r
+**/\r
EFI_STATUS\r
EFIAPI\r
KbdControllerDriverSupported (\r
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
);\r
\r
+/**\r
+ Create KEYBOARD_CONSOLE_IN_DEV instance on controller.\r
+ \r
+ @param This Pointer of EFI_DRIVER_BINDING_PROTOCOL\r
+ @param Controller driver controller handle\r
+ @param RemainingDevicePath Children's device path\r
+ \r
+ @retval whether success to create floppy control instance.\r
+**/\r
EFI_STATUS\r
EFIAPI\r
KbdControllerDriverStart (\r
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
);\r
\r
+/**\r
+ Stop this driver on ControllerHandle. Support stoping any child handles\r
+ created by this driver.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ControllerHandle Handle of device to stop driver on\r
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
+ children is zero stop the entire bus driver.\r
+ @param ChildHandleBuffer List of Child Handles to Stop.\r
+\r
+ @retval EFI_SUCCESS This driver is removed ControllerHandle\r
+ @retval other This driver was not removed from this device\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
KbdControllerDriverStop (\r
IN EFI_HANDLE *ChildHandleBuffer\r
);\r
\r
+/**\r
+ Free the waiting key notify list.\r
+ \r
+ @param ListHead Pointer to list head\r
+ \r
+ @retval EFI_INVALID_PARAMETER ListHead is NULL\r
+ @retval EFI_SUCCESS Sucess to free NotifyList\r
+**/\r
EFI_STATUS\r
KbdFreeNotifyList (\r
IN OUT LIST_ENTRY *ListHead\r
};\r
\r
/**\r
- Test controller is a keyboard Controller\r
+ Test controller is a keyboard Controller.\r
\r
@param This Pointer of EFI_DRIVER_BINDING_PROTOCOL\r
@param Controller driver's controller\r
ConsoleIn->DevicePath\r
);\r
\r
- if (ConsoleIn->TimerEvent) {\r
+ if (ConsoleIn->TimerEvent != NULL) {\r
gBS->CloseEvent (ConsoleIn->TimerEvent);\r
ConsoleIn->TimerEvent = NULL;\r
}\r
//\r
// Free other resources\r
//\r
- if ((ConsoleIn->ConIn).WaitForKey) {\r
+ if ((ConsoleIn->ConIn).WaitForKey != NULL) {\r
gBS->CloseEvent ((ConsoleIn->ConIn).WaitForKey);\r
(ConsoleIn->ConIn).WaitForKey = NULL;\r
}\r
Free the waiting key notify list.\r
\r
@param ListHead Pointer to list head\r
+ \r
+ @retval EFI_INVALID_PARAMETER ListHead is NULL\r
+ @retval EFI_SUCCESS Sucess to free NotifyList\r
**/\r
EFI_STATUS\r
KbdFreeNotifyList (\r
}\r
\r
/**\r
- The user Entry Point for module Ps2Keyboard. The user code starts with this function.\r
+ The module Entry Point for module Ps2Keyboard. \r
\r
@param[in] ImageHandle The firmware allocated handle for the EFI image. \r
@param[in] SystemTable A pointer to the EFI System Table.\r