|
From: Tim R. <ti...@pr...> - 2017-08-17 00:13:45
|
Anand Nahar wrote: > @Chris > > why are you using Libusb to perform low-level file transfer? > > * Libusb provides me with more control over the USB hardware. Apart > from data transfer, there are other aspects to the project which > needs the low level USB commands for e.g. isochronous transfers. I > also need to send particular data sequence to a particular set of > blocks on the device which are known to break things in the past. > fopen() and fprintf() being high level API’s doesn’t guarantee me > anything. Also, doesn't their implement depend on the platform > itself? I may be wrong with these assumptions and there may be a > way to do all these things using the high level API's. > A device that meets the USB Mass Storage spec is certainly not going to have any isochronous endpoints. If your device has a file system, then it's clearly ridiculous to use libusb. There are far too many details for you to track. If you're skipping the file system and just using it as a raw data store, all of the operating systems have ways of writing directly to blocks on the disk. Linux makes it easy; just open /dev/sdc, seek, and write. Windows is not much more difficult. -- Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |