From fc1a334bf6ca78526663302818eb0a558c458a93 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 10 May 2011 08:32:12 -0300 Subject: [PATCH] atusb/fw/usb/dfu.c (dfu): lowered bwPollTimeout from 1 s to 100 ms and explained why --- atusb/fw/usb/dfu.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/atusb/fw/usb/dfu.c b/atusb/fw/usb/dfu.c index 2435b5c..cdc0254 100644 --- a/atusb/fw/usb/dfu.c +++ b/atusb/fw/usb/dfu.c @@ -94,11 +94,16 @@ static const uint8_t functional_descriptor[] = { }; +/* + * The worst-case activity would be flashing a one page and erasing another + * one, would should take less than 10 ms. A 100 ms timeout ought to be plenty. + */ + struct dfu dfu = { - OK, - LE(1000), 0, - dfuIDLE, - 0, + OK, /* bStatus */ + LE(100), 0, /* bwPollTimeout, 100 ms */ + dfuIDLE, /* bState */ + 0, /* iString */ };