ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference

 


IOHIDDeviceInterface122

Declared In:

Overview

CFPlugin object subclass which provides the primary interface to HID devices. This class is a subclass of IOHIDDeviceInterface121.



Functions

copyMatchingElements

Obtains specific elements defined by the device.

setInterruptReportHandlerCallback

Sets the report handler callout to be called when the data is received from the Interrupt-In pipe.


copyMatchingElements


Obtains specific elements defined by the device.

IOReturn ( *copyMatchingElements)(
    void *self, 
    CFDictionaryRef matchingDict, 
    CFArrayRef *elements);  
Parameters
matchingDict

Dictionary containg key/value pairs to match on. Pass a null value to match on all elements.

elements

Pointer to a CFArrayRef that will be returned by this method. It is up to the caller to release it when finished.

Return Value

Returns an IOReturn code.

Discussion

Using keys defined in IOHIDKeys.h for elements, create a matching dictonary containing items that you wish to search for. A null array indicates that no elements matching that criteria were found. Each item in the array is a reference to the same dictionary item that represents each element in the I/O Registry. It is up to the caller to release the returned array of elements.


setInterruptReportHandlerCallback


Sets the report handler callout to be called when the data is received from the Interrupt-In pipe.

IOReturn ( *setInterruptReportHandlerCallback)( 
    void *self, 
    void *reportBuffer, 
    uint32_t reportBufferSize, 
    IOHIDReportCallbackFunction callback, 
    void *callbackTarget, 
    void *callbackRefcon);  
Parameters
reportBuffer

Pointer to a preallocated buffer.

reportBufferSize

Size of the reportBuffer in bytes.

callback

If non-NULL, is a callback to be called when data is received from the device.

callbackTarget

The callback target passed to the callback

callbackRefcon

The callback refcon passed to the callback.

Return Value

Returns an IOReturn code.

Discussion

In order for this to work correctly, you must call createAsyncPort and createAsyncEventSource.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.

 

Last Updated: 2009-02-23