On Tue, 29 Nov 2005, tong changda wrote:

> hello.
>      Never develop a composite usb driver, Now I will develop a composite 
> usb-serial driver based on intel pxa270. It connect to windows pc that has 
> usb driver that create two virtual comm port.
>     I want to know the usual way to develop gadget driver's side of code,My 
> plan is like this:
>     Composite serial gadget driver has on configuration with two interface, 
> each interface has two endpoint, in&out,corresponding one virtual 
> serialport. right? If pc want to send data to com1 that set_interface 0 
> first and set_interface 1 before send data to com2?,

set_interface means something else.  When the host sends 
set_interface(i,n) it is telling the device to change interface i to 
altsetting n.  You will probably have only one altsetting for each 
interface, so the host would not use set_interface.

> but if current 
> interface is 0, than i want to send data to interface 1's endpoint, Will pc 
> detect this?

There is no "current" interface.  When the device is configured, all the 
interfaces and their endpoints become active.

>     Also confused with compound usb device, Is this a device that has 
> multiple internal components tied together by an. embedded USB hub?

Yes.

>  on the 
> driver , it has multiple configuration and each usb controller one 
> correspoind to one usb configuration?

Not really.  Usually each internal component has only one configuration, 
and of course the internal hub has only one configuration.  To the host, a 
compound device looks almost exactly the same as a collection of separate 
devices together with a hub.

> I don't know why pxa270 usb device 
> chip is not a compound usb device , but the manual says it support multiple 
> configuration?

Configurations are different from components.  A component is a physical
object; it is essentially the same as a non-compound device.  
Configurations and interfaces, on the other hand, are logical concepts,
not physical.  A single physical non-compound device, like the pxa-270,
may have many configurations.

>     I have not seen any usb gadget driver work on composite device or 
> compound device.So Is there any known hardware that is compound/composite 
> device and source code for me to study?

I don't know of any gadget hardware that is a compound device.

Almost any hardware can act as a composite device.  All you need is more 
than one interface.  The g_ether driver, for example, supports two 
interfaces and so does the g_serial driver when set up for CDC ACM.

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
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