Mailing Lists: Apple Mailing Lists

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

Re: USB newbie issues...



David,

Thanks for the suggestion about checking for stalls - while I'm not sure it's fixed the problem (you know how these "sometimes works sometimes not" problems are) it does seem to have made the code more stable.


On Oct 10, 2005, at 11:45 AM, David Ferguson wrote:


At 9:59 AM -0400 10/10/05, Michael Heinz wrote:



Question:

Is there a way I can replace the usleep calls with some function that can check to see if the calculator is in a ready-to-send or ready-to-receive state? I'm guessing that the control pipe might be good for this, but I can't find any documentation on how to use the control pipe at all.

Any suggestions?




If it looks like an RS-232 interface on the calculator -- does it send you any kind of flow control (X-ON/X-OFF)?


You communicate with the control pipe (endpoint 0) using DeviceRequest(). Standard device requests are defined in Chapter 9 of the USB spec (available from http://usb.org).

Perhaps checking the endpoint status of the data pipes would tell you if they were stalled. Normally I would expect a device to either NAK or STALL requests if it was busy processing them.

Hope this helps.

David Ferguson
Apple Computer

_______________________________________________
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



--- Porkchop D. Clown Balloons, Buffoonery and Balderdash.



_______________________________________________
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: 
 >USB newbie issues... (From: Michael Heinz <email@hidden>)
 >Re: USB newbie issues... (From: David Ferguson <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.