No, we use setReport on the IOHIDDeviceInterface122 to send data to a
control endpoint.
There are 4 different transfer types for endpoints (control,
isochronous, interrupt, and bulk).
When we use setReport, it does a control transfer to our device (on
endpoint #0).
When we use setInterruptReportHandlerCallback, we get data from our
endpoint #2 through an interrupt transfer. Now suppose we have an
other interrupt endpoint, but for output. How do we right to it?
On 5-Aug-05, at 12:31 PM, Boris Shingarov wrote:
Hi Anthony,
When you say "interrupt out endpoint", do you mean sending a HID
report out to it? This is what we do:
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