That "delay loop" with no body would get optimized out. It should minimally do a sleep call, preferably timer based. Very amateur, even for "non-production" code.
However, I am very happy to have even "mostly working" code as a guide to get us started on this new path of development.
Those signed compares such as <=0 are bad practice on u32 numbers.
In the code shown above, serial I/O services the watchdog timer every character, but USB only services it every 32 packets. That seems awfully long, especially if not on a USB 2.0 port. I would try 8 packets instead, or perhaps even every packet just to be safe (especially if you are using a USB mass storage device on your host PC, which could suck a lot of shared USB bandwidth).
Last edited by geekmaster; 08-28-2012 at 01:25 AM.
|