[ros-diffs] [janderwald] 55364: [HIDPARSE] - Use report value when report item bitcount > 1 [KBDHID] - Print raw report - KBDHID starts to receive normal keys and modifier keys

janderwald at svn.reactos.org janderwald at svn.reactos.org
Wed Feb 1 10:36:21 UTC 2012


Author: janderwald
Date: Wed Feb  1 10:36:19 2012
New Revision: 55364

URL: http://svn.reactos.org/svn/reactos?rev=55364&view=rev
Log:
[HIDPARSE]
- Use report value when report item bitcount > 1
[KBDHID]
- Print raw report
- KBDHID starts to receive normal keys and modifier keys

Modified:
    branches/usb-bringup-trunk/drivers/hid/kbdhid/kbdhid.c
    branches/usb-bringup-trunk/lib/drivers/hidparser/api.c
    branches/usb-bringup-trunk/lib/drivers/hidparser/hidparser.c

Modified: branches/usb-bringup-trunk/drivers/hid/kbdhid/kbdhid.c
URL: http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/hid/kbdhid/kbdhid.c?rev=55364&r1=55363&r2=55364&view=diff
==============================================================================
--- branches/usb-bringup-trunk/drivers/hid/kbdhid/kbdhid.c [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/drivers/hid/kbdhid/kbdhid.c [iso-8859-1] Wed Feb  1 10:36:19 2012
@@ -93,6 +93,15 @@
         KeSetEvent(&DeviceExtension->ReadCompletionEvent, 0, 0);
         return STATUS_MORE_PROCESSING_REQUIRED;
     }
+
+    //
+    // print out raw report
+    //
+    ASSERT(DeviceExtension->ReportLength >= 9);
+    DPRINT1("[KBDHID] ReadCompletion %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", DeviceExtension->Report[0], DeviceExtension->Report[1], DeviceExtension->Report[2],
+        DeviceExtension->Report[3], DeviceExtension->Report[4], DeviceExtension->Report[5],
+        DeviceExtension->Report[6], DeviceExtension->Report[7], DeviceExtension->Report[8]);
+
 
     /* get current usages */
     ButtonLength = DeviceExtension->UsageListLength;

Modified: branches/usb-bringup-trunk/lib/drivers/hidparser/api.c
URL: http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/lib/drivers/hidparser/api.c?rev=55364&r1=55363&r2=55364&view=diff
==============================================================================
--- branches/usb-bringup-trunk/lib/drivers/hidparser/api.c [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/lib/drivers/hidparser/api.c [iso-8859-1] Wed Feb  1 10:36:19 2012
@@ -455,7 +455,20 @@
             //
             // store usage and page
             //
-            UsageAndPage[ItemCount].Usage = (ReportItem->UsageMinimum & 0xFFFF);
+            if (ReportItem->BitCount == 1)
+            {
+                //
+                // use usage minimum
+                //
+                UsageAndPage[ItemCount].Usage =(ReportItem->UsageMinimum & 0xFFFF);
+            }
+            else
+            {
+                //
+                // use value from control
+                //
+                UsageAndPage[ItemCount].Usage = (USHORT)Data;
+            }
             UsageAndPage[ItemCount].UsagePage = CurrentUsagePage;
         }
         ItemCount++;
@@ -691,13 +704,14 @@
         //
         // invalid lookup or no scan code available
         //
+        DPRINT1("No Scan code for Usage %x\n", Usage);
         return HIDPARSER_STATUS_I8042_TRANS_UNKNOWN;
     }
 
     //
     // FIXME: translate modifier states
     //
-
+	DPRINT1("Usage %x ScanCode %x\n", Usage, ScanCode);
     HidParser_DispatchKey((PCHAR)&ScanCode, KeyAction, InsertCodesProcedure, InsertCodesContext);
 
     //

Modified: branches/usb-bringup-trunk/lib/drivers/hidparser/hidparser.c
URL: http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/lib/drivers/hidparser/hidparser.c?rev=55364&r1=55363&r2=55364&view=diff
==============================================================================
--- branches/usb-bringup-trunk/lib/drivers/hidparser/hidparser.c [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/lib/drivers/hidparser/hidparser.c [iso-8859-1] Wed Feb  1 10:36:19 2012
@@ -683,9 +683,8 @@
         else
         {
             //
-            // invalid page
+            // invalid page / end of usage list page
             //
-            DPRINT1("[HIDPARSE] Error unexpected usage page %x\n", ChangedUsageList[Index].UsagePage);
             return HIDP_STATUS_I8042_TRANS_UNKNOWN;
         }
 




More information about the Ros-diffs mailing list