On Mon, 04 Jun 2007 22:29:30 +0200, neimad <[EMAIL PROTECTED]> wrote:


I have comments and questions about usb_read_TuxDroid():

Looking into it, it seems to be an old function which is not used anymore. In the previous usb firmware, status were read one at a time (4 bytes) and usually 5 different status were generated each 100ms, that's where the loop and the upper bound come from. This didn't make much sense that's why I suggested to change the usb protocol to be able to request all status that are available in one shot.

I'm going to remove that function.

  (3) The documentation[1] of usb_interrupt_read() doesn't say much,
      but I guess it may read fewer bytes than requested, and even
      return 0 in case of a timeout. This means that the loop could
      have read data in several iterations and still reset the loop
      index to 0.

The USB IC has a transfer queue and it's not possible to request more bytes than present in the queue. I guess it was a kind of synchronisation trick though I'm not sure it was useful.

Sorry for the trouble,
David

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
tux-droid-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-user

Reply via email to