Kurt Meier wrote:
Hi, I am trying to write a gadget driver and there are still some troubles in understanding. The udc driver is the hardware related part and the gadget driver the neutral part, or I am completly wrong?

That's right, although I usually talk about a "controller driver" since not all vendors call their controllers a UDC. The original authors of the USB spec didn't standardize terminology there; I think in part because they wanted to facilitate any/all implementation shortcuts.


Now my questions, -who says how many endpoints are available and how they are configured?

The controller driver says what endpoints are available, and may also limit how they can be configured ... it's basically just passing on what the hardware designers decided.

The gadget driver is what enables them.  As part of enabling an
endpoint, it can change things as allowed by the hardware.  For
example, some hardware can change endpoint numbering, direction
and type; while others can't really change anything.


-where to fill out the descriptors?

Gadget driver. Though the more recent code lets the gadget driver delegate some of that responsibility to "endpoint autoconfiguration" library code. The gadget driver still needs to say things like "this protocol needs two bulk endpoints and an interrupt endpoint".


-must there additional drivers be loaded if I want to use the device with a windows machine, or is it enough to load the udc driver?

You always need both a controller driver (implementing the "gadget" API using that hardware) and a gadget driver (using that API to talk some application protocol).

If the gadget driver talks a protocol that Windows talks, like the
"g_file_storage" code or, with the newish RNDIS code, "g_ether",
then you'll be able to talk with MS-Windows.

I understand that if someone taught "g_serial" to look more like
a CDC-ACM modem (without certain features), that'd be able to talk
with Windows too.

- Dave


Hope someone can help me Kurt





-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to