From c53b9e25c9fd4ee00c648a70a341959a1a018d50 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 10 Jun 2005 03:43:43 +0000 Subject: got things compiling with ImmrHIDUtilAddOn; looks like there is a newer version of HID Utilities which Apple hasn't released yet. The ones in FFB must be part of that newer version since they don't match version 3.7 svn path=/trunk/externals/hcs/hid/; revision=3160 --- .../HID Utilities Slib.pbproj/project.pbxproj | 52 ++++++++++++++++++++++ HID Utilities Source/HID_Queue_Utilities.c | 7 ++- HID Utilities Source/HID_Utilities.c | 8 ++-- HID Utilities Source/ImmrHIDUtilAddOn.h | 6 ++- 4 files changed, 65 insertions(+), 8 deletions(-) diff --git a/HID Utilities Source/HID Utilities Slib.pbproj/project.pbxproj b/HID Utilities Source/HID Utilities Slib.pbproj/project.pbxproj index 2564ed7..03c11c4 100755 --- a/HID Utilities Source/HID Utilities Slib.pbproj/project.pbxproj +++ b/HID Utilities Source/HID Utilities Slib.pbproj/project.pbxproj @@ -33,6 +33,52 @@ //112 //113 //114 +//3A0 +//3A1 +//3A2 +//3A3 +//3A4 + 3A1E2F8308593DC100E32947 = { + fileEncoding = 4; + isa = PBXFileReference; + path = HID_APIs.h; + refType = 4; + }; + 3A1E2F8408593DC100E32947 = { + fileRef = 3A1E2F8308593DC100E32947; + isa = PBXBuildFile; + settings = { + }; + }; + 3A1E2F8508593DD700E32947 = { + fileEncoding = 4; + isa = PBXFileReference; + path = ImmrHIDUtilAddOn.h; + refType = 4; + }; + 3A1E2F8608593DD700E32947 = { + fileRef = 3A1E2F8508593DD700E32947; + isa = PBXBuildFile; + settings = { + }; + }; + 3A1E2F8708593DE400E32947 = { + fileEncoding = 4; + isa = PBXFileReference; + path = ImmrHIDUtilAddOn.c; + refType = 4; + }; + 3A1E2F8808593DE400E32947 = { + fileRef = 3A1E2F8708593DE400E32947; + isa = PBXBuildFile; + settings = { + }; + }; +//3A0 +//3A1 +//3A2 +//3A3 +//3A4 //F60 //F61 //F62 @@ -141,6 +187,7 @@ F94745DA01B2DB130ACA2316, 113C0C5F036745F00CCB177F, F94745E601B2DB720ACA2316, + 3A1E2F8708593DE400E32947, ); isa = PBXGroup; name = Source; @@ -194,6 +241,8 @@ F94745F201B301760ACA2316, F94467C402469A860ACA2316, 11019ECA0367675E0CCB177F, + 3A1E2F8408593DC100E32947, + 3A1E2F8608593DD700E32947, ); isa = PBXHeadersBuildPhase; runOnlyForDeploymentPostprocessing = 0; @@ -207,6 +256,7 @@ F94745F401B3062C0ACA2316, F94467BF024699CF0ACA2316, 113C0C60036745F00CCB177F, + 3A1E2F8808593DE400E32947, ); isa = PBXSourcesBuildPhase; runOnlyForDeploymentPostprocessing = 0; @@ -254,6 +304,8 @@ F94745E301B2DB720ACA2316, F94745E401B2DB720ACA2316, F94745EF01B301760ACA2316, + 3A1E2F8308593DC100E32947, + 3A1E2F8508593DD700E32947, ); isa = PBXGroup; name = "External Headers"; diff --git a/HID Utilities Source/HID_Queue_Utilities.c b/HID Utilities Source/HID_Queue_Utilities.c index c4e37a3..70af952 100755 --- a/HID Utilities Source/HID_Queue_Utilities.c +++ b/HID Utilities Source/HID_Queue_Utilities.c @@ -509,11 +509,13 @@ try_getElementValue: HIDREPORTERROR ("HIDGetElementValue - invalid device and/or element."); // record min and max for auto scale and auto ... +/* if (hidEvent.value < pElement->calMin) pElement->calMin = hidEvent.value; if (hidEvent.value > pElement->calMax) pElement->calMax = hidEvent.value; - +*/ + // auto user scale return hidEvent.value; } @@ -547,6 +549,7 @@ long HIDSetElementValue (pRecDevice pDevice, pRecElement pElement,void* pIOHIDEv // --------------------------------- // Set a callback to be called when a queue goes from empty to non-empty +/* long HIDSetQueueCallback (pRecDevice pDevice, IOHIDCallbackFunction callback) { IOReturn result = kIOReturnError; // assume failure (pessimist!) @@ -582,7 +585,7 @@ long HIDSetQueueCallback (pRecDevice pDevice, IOHIDCallbackFunction callback) HIDREPORTERROR ("HIDSetQueueCallback - invalid device and/or element."); return result; } - +*/ #if 1 // --------------------------------- // Get a report from a device diff --git a/HID Utilities Source/HID_Utilities.c b/HID Utilities Source/HID_Utilities.c index f1fdbc4..b7b22c5 100755 --- a/HID Utilities Source/HID_Utilities.c +++ b/HID Utilities Source/HID_Utilities.c @@ -99,7 +99,7 @@ static void hid_GetElementInfo (CFTypeRef refElement, pRecElement pElement) else pElement->min = 0; - pElement->calMax = pElement->min; +// pElement->calMax = pElement->min; pElement->userMin = kDefaultUserMin; refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementMaxKey)); @@ -108,7 +108,7 @@ static void hid_GetElementInfo (CFTypeRef refElement, pRecElement pElement) else pElement->max = 0; - pElement->calMin = pElement->max; +// pElement->calMin = pElement->max; pElement->userMax = kDefaultUserMax; refType = CFDictionaryGetValue (refElement, CFSTR(kIOHIDElementScaledMinKey)); @@ -1853,7 +1853,7 @@ void HIDGetUsageName (const long valueUsagePage, const long valueUsage, char * c // --------------------------------- // returns calibrated value given raw value passed in // calibrated value is equal to min and max values returned by HIDGetElementValue since device list built scaled to element reported min and max values - +/* SInt32 HIDCalibrateValue (SInt32 value, pRecElement pElement) { if (NULL != pElement) @@ -1868,7 +1868,7 @@ SInt32 HIDCalibrateValue (SInt32 value, pRecElement pElement) else return 0; // bad element passed in } - +*/ // --------------------------------- // returns scaled value given raw value passed in // scaled value is equal to current value assumed to be in the range of element reported min and max values scaled to user min and max scaled values diff --git a/HID Utilities Source/ImmrHIDUtilAddOn.h b/HID Utilities Source/ImmrHIDUtilAddOn.h index 2f3ea24..4563a61 100755 --- a/HID Utilities Source/ImmrHIDUtilAddOn.h +++ b/HID Utilities Source/ImmrHIDUtilAddOn.h @@ -7,5 +7,7 @@ * */ -extern io_object_t AllocateHIDObjectFromRecDevice( pRecDevice pDevice ); -extern Boolean FreeHIDObject( io_object_t hidDevice ); \ No newline at end of file +//extern io_object_t AllocateHIDObjectFromRecDevice( pRecDevice pDevice ); +//extern Boolean FreeHIDObject( io_object_t hidDevice ); +io_service_t AllocateHIDObjectFromRecDevice( pRecDevice pDevice ); +bool FreeHIDObject( io_service_t hidDevice ); -- cgit v1.2.1