Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reading from an interrupt Endpoint with USB fxs



I tried to use the device HID interface, but I can't figure
it out. So I put the kext back in the
system/library/extensions so I can use the device as USB.

I copied USBSimple Example, changed the idvendor and
idproduct to that of my product, and changed dealWithPipes
to use interrupt pipes (kUSBInterrupt), instead of bulk
pipes

Everything runs fine. I have the intf, and the inPipeRef,
so far so good.

I understand that I have to use IOUSBInterfaceInterface
http://developer.apple.com/documentation/Darwin/Reference/IOKit/IOUSBLib/Classes/IOUSBInterfaceInterface/
I saw that ReadPipe reads data on a BULK IN or an INTERRUPT
pipe, so I tried

numBytesRead = sizeof(gBuffer) - 1;
err = (*intf)->ReadPipe(intf, inPipeRef, gBuffer, &numBytesRead);

but I get an error message.

I tried uncommenting
    if (inPipeRef && outPipeRef)
	transferData(intf, inPipeRef, outPipeRef);
and I don't get any error message there, but I don't
understand what this function does: Can I recover from it
the data that my device is putting out every 10msec?

ignoramus








 _______________________________________________
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

References: 
 >reading from an interrupt Endpoint with HID fxs (From: Anne G <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.