This is the mail archive of the ecos-devel@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: STM32 USB support


Andrew Lunn wrote:
There is a significant difference from the other USB drivers which I
should probably flag up (and document). The endpoint configuration is
generated dynamically from the USB descriptors. This gives a lot of
flexibility and potentially allows support for multiple configurations
(untested!). However, the downside is that I had to leave out devtab
support since the devtab entries need to be set statically.
Don't you think it's possible to have both options? I haven't looked at
the USB subsystem or any drivers, but I think a public driver should
behave as the subsystem intends. Maybe the subsystem could be extended
for more dynamic usage though.
The official docs say "To support this the device driver can provide a
devtab entry for each endpoint".  I took that to mean that devtab
support was optional - and the dynamic endpoint configuration is a much
more useful feature IMHO.

Previously supported hardware has had fixed endpoint configurations
which makes the static devtab entries easy to implement.  However, with
dynamic endpoint configuration, the low-level driver doesn't know
a-priori what endpoints to generate devtab entries for - and nor should it!

The AT91 USB driver has something similar to this. It can configure the endpoints by looking at the USB descriptors.

I don't remember how it works with respect to devtab entries.

Chris, do you have any example code using your driver? I was wondering if your approach to dynamically set the endpoint configurations should be offered as an official alternative to the devtab entries (or we may even get rid of the devtab entries). I may be working on USB serial and ethernet support. The USB serial driver at least seems to be tailored for the AT91 driver right now and cannot be used generically yet. We could change that to use dynamic setup of endpoints, which I think would be a great idea.


Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]