The trickiest part is that before calling this, you need to obtain the
outCookie, and there can be subtleties. In our case, we know the index
of the elements and simply hardcode it:
elements = CFDictionaryGetValue(element1, CFSTR(kIOHIDElementKey));
if (!elements) { ... bad ... }
if (CFGetTypeID(elements) != CFArrayGetTypeID()) { ... bad ... }
printf("Found %d elements\n", CFArrayGetCount(elements));
// First OUT element
element1 = CFArrayGetValueAtIndex(elements, 1);
c = at(element1, CFSTR(kIOHIDElementTypeKey)); // for convenience, at()
is our own wrapper around CFDictionaryGetValue()
if (c==kIOHIDElementTypeOutput) printf("Element 1 is OUTPUT\n");
hid->outCookie = at(element1, CFSTR(kIOHIDElementCookieKey));
Obviously this is only one of a number of possible ways.
Boris
Hello:
We have a USB HID device that we can access using
IOHIDDeviceInterface122. We can get data from the device's interrupt
in endpoint using setInterruptReportHandlerCallback. How do we send
data to an interrupt out endpoint?
Can we do it using the HID interfaces, or do we need to use
IOUSBInterfaceInterface?
If so, can we get this interface via our IOHIDDeviceInterface?
Or do we need to abandon IOHIDDeviceInterface, and write a codeless
kext in order to use IOUSBDeviceInterface and IOUSBInterfaceInterface
directly?
Thanks in advance,
Anthony
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden