Anthony isn't using the cookies and que method to talk to hid. He is
using the interrupt callback which gives him the complete HID packet
for him decode on his own.
Anthony, your best bet is to look at getReport() and setReport() which
are defined in IOHIDDeviceInterface121. Since you are using
IOHIDDeviceInterface122, you'll have access to the
IOHIDDeviceInterface121 api calls.
-raleigh
On Aug 5, 2005, at 9:31 AM, 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
This email sent to email@hidden
_______________________________________________
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