-#/** @file\r
-# Component name for module UsbKb\r
-#\r
-# FIX ME!\r
-# Copyright (c) 2006, Intel Corporation. All right reserved.\r
-#\r
-# All rights reserved. This program and the accompanying materials\r
+## @file\r
+# USB Keyboard Driver that manages USB keyboard and produces Simple Text Input(Ex) Protocol.\r
+#\r
+# USB Keyboard Driver consumes USB I/O Protocol and Device Path Protocol, and produces\r
+# Simple Text Input Protocol and Simple Text Input Ex Protocol on USB keyboard devices.\r
+# It initializes the keyboard layout according to info retrieved from HII database.\r
+# If HII cannot provide the info, this module uses its carried default one if PCD allows.\r
+# It manages the USB keyboard device via Asynchronous Interrupt Transfer of USB I/O Protocol,\r
+# and parses the data according to USB HID documents.\r
+# This module refers to following specifications:\r
+# 1. Universal Serial Bus HID Firmware Specification, ver 1.11\r
+# 2. Universal Serial Bus HID Usage Tables, ver 1.12\r
+# 3. UEFI Specification, v2.1\r
+#\r
+# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#\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
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
#\r
#\r
-#**/\r
+##\r
\r
-################################################################################\r
-#\r
-# Defines Section - statements that will be processed to create a Makefile.\r
-#\r
-################################################################################\r
[Defines]\r
INF_VERSION = 0x00010005\r
BASE_NAME = UsbKbDxe\r
+ MODULE_UNI_FILE = UsbKbDxe.uni\r
FILE_GUID = 2D2E62CF-9ECF-43b7-8219-94E7FC713DFE\r
- MODULE_TYPE = DXE_DRIVER\r
+ MODULE_TYPE = UEFI_DRIVER\r
VERSION_STRING = 1.0\r
- EDK_RELEASE_VERSION = 0x00020000\r
- EFI_SPECIFICATION_VERSION = 0x00020000\r
-\r
ENTRY_POINT = USBKeyboardDriverBindingEntryPoint\r
\r
#\r
# The following information is for reference only and not required by the build tools.\r
#\r
-# VALID_ARCHITECTURES = IA32 X64 IPF EBC\r
-#\r
-\r
-################################################################################\r
+# VALID_ARCHITECTURES = IA32 X64 IPF EBC ARM AARCH64\r
#\r
-# Sources Section - list of files that are required for the build to succeed.\r
+# DRIVER_BINDING = gUsbKeyboardDriverBinding \r
+# COMPONENT_NAME = gUsbKeyboardComponentName\r
+# COMPONENT_NAME2 = gUsbKeyboardComponentName2\r
#\r
-################################################################################\r
\r
-[Sources.common]\r
- efikey.c\r
- efikey.h\r
- keyboard.c\r
+[Sources]\r
+ EfiKey.c\r
+ EfiKey.h\r
+ KeyBoard.c\r
ComponentName.c\r
- keyboard.h\r
-\r
-################################################################################\r
-#\r
-# Package Dependency Section - list of Package files that are required for\r
-# this module.\r
-#\r
-################################################################################\r
+ KeyBoard.h\r
\r
[Packages]\r
MdePkg/MdePkg.dec\r
-\r
-\r
-################################################################################\r
-#\r
-# Library Class Section - list of Library Classes that are required for\r
-# this module.\r
-#\r
-################################################################################\r
+ MdeModulePkg/MdeModulePkg.dec\r
\r
[LibraryClasses]\r
MemoryAllocationLib\r
ReportStatusCodeLib\r
DebugLib\r
PcdLib\r
- UsbLib\r
-\r
-\r
-################################################################################\r
-#\r
-# Guid C Name Section - list of Guids that this module uses or produces.\r
-#\r
-################################################################################\r
+ UefiUsbLib\r
+ HiiLib\r
\r
[Guids]\r
- gEfiHotPlugDeviceGuid # ALWAYS_CONSUMED\r
-\r
-\r
-################################################################################\r
-#\r
-# Protocol C Name Section - list of Protocol and Protocol Notify C Names\r
-# that this module uses or produces.\r
-#\r
-################################################################################\r
+ #\r
+ # Event registered to EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID group,\r
+ # which will be triggered by EFI_HII_DATABASE_PROTOCOL.SetKeyboardLayout().\r
+ #\r
+ gEfiHiiKeyBoardLayoutGuid ## SOMETIMES_CONSUMES ## Event\r
+ gUsbKeyboardLayoutPackageGuid ## SOMETIMES_CONSUMES ## HII\r
+ gUsbKeyboardLayoutKeyGuid ## SOMETIMES_PRODUCES ## UNDEFINED\r
\r
[Protocols]\r
- gEfiUsbIoProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
- gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
- gEfiSimpleTextInProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
-\r
-################################################################################\r
-#\r
-# Pcd FIXED_AT_BUILD - list of PCDs that this module is coded for.\r
-#\r
-################################################################################\r
-\r
-[PcdsFixedAtBuild]\r
- PcdStatusCodeValueKeyboardEnable|gEfiMdePkgTokenSpaceGuid\r
- PcdStatusCodeValueKeyboardPresenceDetect|gEfiMdePkgTokenSpaceGuid\r
- PcdStatusCodeValueKeyboardDisable|gEfiMdePkgTokenSpaceGuid\r
- PcdStatusCodeValueKeyboardReset|gEfiMdePkgTokenSpaceGuid\r
- PcdStatusCodeValueKeyboardClearBuffer|gEfiMdePkgTokenSpaceGuid\r
- PcdStatusCodeValueKeyboardSelfTest|gEfiMdePkgTokenSpaceGuid\r
- PcdStatusCodeValueKeyboardInterfaceError|gEfiMdePkgTokenSpaceGuid\r
- PcdStatusCodeValueKeyboardInputError|gEfiMdePkgTokenSpaceGuid
\ No newline at end of file
+ gEfiUsbIoProtocolGuid ## TO_START\r
+ gEfiDevicePathProtocolGuid ## TO_START\r
+ gEfiSimpleTextInProtocolGuid ## BY_START\r
+ gEfiSimpleTextInputExProtocolGuid ## BY_START\r
+ #\r
+ # If HII Database Protocol exists, then keyboard layout from HII database is used.\r
+ # Otherwise, USB keyboard module tries to use its carried default layout.\r
+ #\r
+ gEfiHiiDatabaseProtocolGuid ## SOMETIMES_CONSUMES\r
+ \r
+[FeaturePcd]\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdDisableDefaultKeyboardLayoutInUsbKbDriver ## CONSUMES\r
+\r
+# [Event]\r
+# EVENT_TYPE_RELATIVE_TIMER ## CONSUMES\r
+#\r
+\r
+[UserExtensions.TianoCore."ExtraFiles"]\r
+ UsbKbDxeExtra.uni\r