Thanks for the pointers to the documentation projects. I’m still tossing up what to use; I don’t want to clutter the source up, and I don’t want some of the exact implementation details to be shown to the user (for example, I’d want the endpoint macros to appear as functions instead).
I spent last night tweaking the Mass Storage device demo to make it smaller and faster. By downloading the Mass Storage Compliance document from the USB-IF I was able to rip out all the SCSI commands not made mandatory by the specification. The result is sizable reduction in code, saving space, potential bugs and comprehension requirements. The demo currently writes at a peak of a little over 100KB/S on Vista 32-bit, and reads at over 200KB/S on the same system, and compiles down to a little over 5KB.
Speaking of bugs, the code cleanup revealed an annoying bug in the Mass Storage code. After re-testing the demo with an Ubuntu live CD, I discovered that the demo wouldn’t mount with the latest code. Further probing caused me to bang my head on the wall in shame; the SCSI SENSE data being returned by my code had an invalid parameter which Windows ignored, but Ubuntu (specifically, the Linux SCSI handler) chucked a wobbly over.
Recent Comments