1 Nov 2006 01:29
Re: libusb1.0 API
frits vanderlinden <frits <at> sun.com>
2006-11-01 00:29:28 GMT
2006-11-01 00:29:28 GMT
> So one extra abstraction layer which is a superset of all supported > OS USB APIs. Can that be created easily enough? > see my previous mail on libusb_*_submit() example > >>> Does there have to be any corner cases left? :) >> There will always be races (eg. the device disappears during a >> transfer from the device to the host. do we return the data >> transferred so far or just tell the caller the request failed >> because the device went away). > > Both, USB is hot-pluggable. More? > well, this needs to be documented so we don't surprise the libusb application writer and make it easy for writing a backend. When I wrote the solaris implementation of libusb.0.1.0.8 I had to use the linux implementation to figure out how to do the implementation and handle corner cases. Ideally, a back-end writer should be able to work from a "spec" or a set of man pages. > >>> This is obviously the purpose of libusb. Please expand on your >>> thoughts about the frontend/backend split. I don't know if I like >>> it. >> see above, I hope you like it > > Still not sure. I think I would prefer shared functions for common > tasks. The problem I see is that a change in one OS USB API will > affect other OS ports because the internal API (front/back split) > has to change. > there is that possibility. The interface between front-end and back-end needs to be carefully designed. > >> By having most of the implementation in the front-end, we will get >> for "free" that each OS implementation behave very similar in many >> respects. > > Until one doesn't. > > Hopefully the front-end can at least ensure that error codes are consistent >> the idea of the test device is that it really behaves very poorly >> and unpredictably. It should never crash libusb or the kernel and >> it should in theory provide complete code coverage during the >> testing > > This is quickly turning into a separate project much bigger than > libusb. :) It's also a good test for different kernels. > yeah, I always wanted to have that kind of device for our USB driver testingcheers fritS ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
cheers
fritS
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
RSS Feed