1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-07-03 02:07:42 +03:00

atusb/fw/boot.c: adjusted the delay loop and don't race with dfu-util

- boot.c (MS_TO_LOOPS): increased loop count now that we no longer
  have to poll
- boot.c (main): increased delay from 2.0 s to 2.5 s, because we were
  racing with a sleep(2) in dfu-util
This commit is contained in:
Werner Almesberger 2011-06-11 14:26:52 -03:00
parent 376236949b
commit b42577bb72

View File

@ -28,7 +28,7 @@
#include "atusb/ep0.h"
#define MS_TO_LOOPS(ms) ((uint32_t) (ms)*81)
#define MS_TO_LOOPS(ms) ((uint32_t) (ms)*335)
static void (*run_payload)(void) = 0;
@ -59,7 +59,7 @@ int main(void)
led(1);
while (loop != MS_TO_LOOPS(2000)) {
while (loop != MS_TO_LOOPS(2500)) {
if (dfu.state == dfuIDLE && pgm_read_byte(zero) != 0xff)
loop++;
else