Today I encountered "kIOReturnOverrun" when reading pipe.
I cannot find out why this error occurred, because I use almost same
source for UNIX tool, and it works for same USB device. I'm now
Converting Objective-C class. The code follows:
Please tell me what should I check.
- (int)read:(void *)buf
:(const size_t)size
{
int err;
UInt32 readSize = (UInt32)size;
memset(buf, 0, size);
for (int i = 0; i < 10; ++i) {
usleep(WAIT_TIME);
err = (int)(*interfaceIntf)->GetPipeStatus(interfaceIntf,
inPipeRef);
if (err) {
if (err == kIOUSBPipeStalled) {
DEBUGF("pipe stalled. (%d)\n", (int)err);
err = (int)(*interfaceIntf)->ClearPipeStall
(interfaceIntf, inPipeRef);
if (err) {
DEBUGF("ClearPipeStall failed. (0x%08x)\n", (int)
err);
return err;
}
}
else {
DEBUGF("PipeStatus failed. (0x%08x)\n", (int)err);
}
}
_______________________________________________
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