mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-22 14:30:35 +02: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:
parent
376236949b
commit
b42577bb72
@ -28,7 +28,7 @@
|
|||||||
#include "atusb/ep0.h"
|
#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;
|
static void (*run_payload)(void) = 0;
|
||||||
@ -59,7 +59,7 @@ int main(void)
|
|||||||
|
|
||||||
led(1);
|
led(1);
|
||||||
|
|
||||||
while (loop != MS_TO_LOOPS(2000)) {
|
while (loop != MS_TO_LOOPS(2500)) {
|
||||||
if (dfu.state == dfuIDLE && pgm_read_byte(zero) != 0xff)
|
if (dfu.state == dfuIDLE && pgm_read_byte(zero) != 0xff)
|
||||||
loop++;
|
loop++;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user