Date:2011-06-11 19:26:52 (12 years 9 months ago)
Author:Werner Almesberger
Commit:b42577bb72fb82ac5429034329652189ca94bf4c
Message: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
Files: atusb/fw/boot.c (2 diffs)

Change Details

atusb/fw/boot.c
2828#include "atusb/ep0.h"
2929
3030
31#define MS_TO_LOOPS(ms) ((uint32_t) (ms)*81)
31#define MS_TO_LOOPS(ms) ((uint32_t) (ms)*335)
3232
3333
3434static void (*run_payload)(void) = 0;
...... 
5959
6060    led(1);
6161
62    while (loop != MS_TO_LOOPS(2000)) {
62    while (loop != MS_TO_LOOPS(2500)) {
6363        if (dfu.state == dfuIDLE && pgm_read_byte(zero) != 0xff)
6464            loop++;
6565        else

Archive Download the corresponding diff file



interactive