To fix,
authorxgu3 <xgu3@de2fecce-e211-0410-80a6-f3fac2684e05>
Mon, 15 Jan 2007 06:24:49 +0000 (06:24 +0000)
committerxgu3 <xgu3@de2fecce-e211-0410-80a6-f3fac2684e05>
Mon, 15 Jan 2007 06:24:49 +0000 (06:24 +0000)
1. ScrollLock key does not work in USB KB driver
2. PCI_ROOT_BRIDGE_IO.configuration should use OUT for Resources

git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@2248 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.h
edk2/EdkModulePkg/Bus/Usb/UsbKb/Dxe/keyboard.c
edk2/MdePkg/Include/Protocol/PciRootBridgeIo.h

index 091dd69..31307eb 100644 (file)
@@ -65,6 +65,7 @@ typedef struct {
   UINT8                         ShiftOn;\r
   UINT8                         NumLockOn;\r
   UINT8                         CapsOn;\r
+  UINT8                         ScrollOn;  \r
   UINT8                         LastKeyCodeArray[8];\r
   UINT8                         CurKeyChar;\r
 \r
@@ -113,6 +114,7 @@ typedef struct {
 typedef struct {\r
   UINT8 NumLock : 1;\r
   UINT8 CapsLock : 1;\r
-  UINT8 Resrvd : 6;\r
+  UINT8 ScrollLock : 1;\r
+  UINT8 Resrvd : 5;\r
 } LED_MAP;\r
 #endif\r
index 1328e6a..b6b97c3 100644 (file)
@@ -761,9 +761,13 @@ USBParseKey (
     // fall through\r
     //\r
     case 0x47:\r
-    //\r
-    // fall through\r
-    //\r
+         //\r
+           // Turn on the ScrollLock light on KB\r
+           //\r
+      UsbKeyboardDevice->ScrollOn ^= 1;\r
+      SetKeyLED (UsbKeyboardDevice);\r
+      continue;\r
+      break;    \r
     case 0x48:\r
     //\r
     // fall through\r
@@ -1042,6 +1046,7 @@ SetKeyLED (
   //\r
   Led.NumLock   = (UINT8) UsbKeyboardDevice->NumLockOn;\r
   Led.CapsLock  = (UINT8) UsbKeyboardDevice->CapsOn;\r
+  Led.ScrollLock = (UINT8) UsbKeyboardDevice->ScrollOn;  \r
   Led.Resrvd    = 0;\r
 \r
   ReportId      = 0;\r
index db0a4ee..af3d9ed 100644 (file)
@@ -356,8 +356,8 @@ EFI_STATUS
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_CONFIGURATION) (\r
-  IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL           *This,\r
-  IN  VOID                                     **Resources\r
+  IN  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL          *This,\r
+  OUT VOID                                     **Resources\r
   );\r
 \r
 struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL {\r