[ros-diffs] [janderwald] 55039: [USB-BRINGUP] - Fix build of hidparse

janderwald at svn.reactos.org janderwald at svn.reactos.org
Sat Jan 21 01:48:30 UTC 2012


Author: janderwald
Date: Sat Jan 21 01:48:30 2012
New Revision: 55039

URL: http://svn.reactos.org/svn/reactos?rev=55039&view=rev
Log:
[USB-BRINGUP]
- Fix build of hidparse

Modified:
    branches/usb-bringup-trunk/drivers/hid/hidparse/hidparse.c
    branches/usb-bringup-trunk/drivers/hid/hidparse/hidparse.h
    branches/usb-bringup-trunk/lib/drivers/hidparser/api.c
    branches/usb-bringup-trunk/lib/drivers/hidparser/hidparser.c
    branches/usb-bringup-trunk/lib/drivers/hidparser/hidparser.h
    branches/usb-bringup-trunk/lib/drivers/hidparser/parser.h

Modified: branches/usb-bringup-trunk/drivers/hid/hidparse/hidparse.c
URL: http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/hid/hidparse/hidparse.c?rev=55039&r1=55038&r2=55039&view=diff
==============================================================================
--- branches/usb-bringup-trunk/drivers/hid/hidparse/hidparse.c [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/drivers/hid/hidparse/hidparse.c [iso-8859-1] Sat Jan 21 01:48:30 2012
@@ -333,11 +333,6 @@
     HID_PARSER Parser;
 
     //
-    // sanity check
-    //
-    ASSERT(ReportType == HidP_Input || ReportType == HidP_Output || ReportType == HidP_Feature);
-
-    //
     // init parser
     //
     HidParser_InitParser(AllocFunction, FreeFunction, ZeroFunction, CopyFunction, DebugFunction, NULL, &Parser);
@@ -345,7 +340,7 @@
     //
     // translate usage pages
     //
-    return HidParser_TranslateUsageAndPagesToI8042ScanCodes(Parser, UsageListLength, KeyAction, ModifierState, InsertCodesProcedure, InsertCodesContext);
+    return HidParser_TranslateUsageAndPagesToI8042ScanCodes(&Parser, ChangedUsageList, UsageListLength, KeyAction, ModifierState, InsertCodesProcedure, InsertCodesContext);
 }
 
 

Modified: branches/usb-bringup-trunk/drivers/hid/hidparse/hidparse.h
URL: http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/hid/hidparse/hidparse.h?rev=55039&r1=55038&r2=55039&view=diff
==============================================================================
--- branches/usb-bringup-trunk/drivers/hid/hidparse/hidparse.h [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/drivers/hid/hidparse/hidparse.h [iso-8859-1] Sat Jan 21 01:48:30 2012
@@ -7,4 +7,5 @@
 #include <hidpi.h>
 #define NDEBUG
 #include <debug.h>
-#include "hidparser.h"
+#include "hidparser.h"
+#include <stdio.h>

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=55039&r1=55038&r2=55039&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] Sat Jan 21 01:48:30 2012
@@ -101,7 +101,6 @@
 {
     PHID_PARSER_CONTEXT ParserContext;
     ULONG Index;
-    ULONG ReportCount = 0;
 
     //
     // get parser context
@@ -863,7 +862,6 @@
     PHID_PARSER_CONTEXT ParserContext;
     ULONG Index;
     PHID_REPORT Report;
-    ULONG ItemCount = 0;
     USHORT CurrentUsagePage;
     PHID_REPORT_ITEM ReportItem;
     ULONG Data;
@@ -1017,7 +1015,7 @@
         //
         // is this a key break
         //
-        if (KeyAction == HidP_KeyboardBreak)
+        if (KeyAction == HidP_Keyboard_Break)
         {
             //
             // add break

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=55039&r1=55038&r2=55039&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] Sat Jan 21 01:48:30 2012
@@ -49,7 +49,7 @@
     OUT PHIDP_DEVICE_DESC DeviceDescription)
 {
     HIDPARSER_STATUS ParserStatus;
-    ULONG CollectionCount, ReportCount;
+    ULONG CollectionCount;
     ULONG Index;
 
     //

Modified: branches/usb-bringup-trunk/lib/drivers/hidparser/hidparser.h
URL: http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/lib/drivers/hidparser/hidparser.h?rev=55039&r1=55038&r2=55039&view=diff
==============================================================================
--- branches/usb-bringup-trunk/lib/drivers/hidparser/hidparser.h [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/lib/drivers/hidparser/hidparser.h [iso-8859-1] Sat Jan 21 01:48:30 2012
@@ -330,6 +330,7 @@
 NTSTATUS
 NTAPI
 HidParser_TranslateUsageAndPagesToI8042ScanCodes(
+   IN PHID_PARSER Parser,
    IN PUSAGE_AND_PAGE  ChangedUsageList,
    IN ULONG  UsageListLength,
    IN HIDP_KEYBOARD_DIRECTION  KeyAction,
@@ -418,6 +419,16 @@
   IN OUT PCHAR  Report,
   IN ULONG  ReportLength);
 
+
+HIDPARSER_STATUS
+HidParser_TranslateUsage(
+    IN PHID_PARSER Parser,
+    IN USAGE Usage,
+    IN HIDP_KEYBOARD_DIRECTION  KeyAction,
+    IN OUT PHIDP_KEYBOARD_MODIFIER_STATE  ModifierState,
+    IN PHIDP_INSERT_SCANCODES  InsertCodesProcedure,
+    IN PVOID  InsertCodesContext);
+
 HIDAPI
 NTSTATUS
 NTAPI

Modified: branches/usb-bringup-trunk/lib/drivers/hidparser/parser.h
URL: http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/lib/drivers/hidparser/parser.h?rev=55039&r1=55038&r2=55039&view=diff
==============================================================================
--- branches/usb-bringup-trunk/lib/drivers/hidparser/parser.h [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/lib/drivers/hidparser/parser.h [iso-8859-1] Sat Jan 21 01:48:30 2012
@@ -4,6 +4,7 @@
 #include <assert.h>
 #include <pshpack1.h>
 #include "hidparser.h"
+#include <ntddkbd.h>
 
  /*
   * Copyright 2007, Haiku, Inc. All Rights Reserved.




More information about the Ros-diffs mailing list