On Sat, 11 Jun 2005, Chris Ostler wrote:

> I've just started to write my first USB driver, and have run into a question
> for which I haven't been able to come up with the answer.
> 
> The device in question (Cygnion CyberGenie telephone) has three interfaces,
> but each interface is only useful when used in conjunction with the others.
> Thus, I would like a single driver, which will register a single device to
> the USB system, but will address each of the three interfaces using some
> very simple logic within the driver.
> 
> I have run into a problem, however, in trying to define pipes to endpoints
> on the different interfaces.  It appears that a pipe is defined in terms of
> a device and an endpoint, which seems insufficient when dealing with
> multiple interfaces (i.e. all may have a control pipe at their own endpoint
> 0).
> 
> I'm sure that I'm just missing something obvious.  How can a pipe be defined
> to the different interfaces of a device?

All interfaces use endpoints from the fixed set {0, 1-in, 1-out, ...,
15-in, 15-out}.  Different interaces from the same configuration are
required to use disjoint subsets of endpoints, except that they all share
endpoint 0.  Hence (except for 0) the endpoint number is sufficient to
tell the device which interface a message is for.

If a message needs to be sent to endpoint 0 for one particular interface, 
the interface number is coded in the message as part of the wIndex value 
in the Setup packet.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to