/*++\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
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
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
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
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
UINT8 PollingInterval;\r
UINT8 PacketSize;\r
BOOLEAN Found;\r
- \r
+\r
UsbKeyboardDevice = NULL;\r
Found = FALSE;\r
\r
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
);\r
return Status;\r
}\r
- \r
+\r
//\r
// Install simple txt in protocol interface\r
// for the usb keyboard device.\r
);\r
return Status;\r
}\r
- \r
+\r
//\r
// Reset USB Keyboard Device\r
//\r
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
if (EFI_ERROR (Status)) {\r
return EFI_UNSUPPORTED;\r
}\r
- \r
+\r
//\r
// Get USB_KB_DEV instance.\r
//\r
\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
UsbKeyboardDevice->CurKeyChar = 0;\r
return EFI_SUCCESS;\r
}\r
- \r
+\r
//\r
// Exhaustive reset\r
//\r
\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
/*++\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
\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