View Single Post
Old 08-28-2012, 12:18 AM   #108
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
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.
geekmaster is offline   Reply With Quote