summaryrefslogtreecommitdiff
path: root/firmware/src/dfu/dfu.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-11-09 23:22:13 +0100
committerHarald Welte <laforge@gnumonks.org>2011-12-14 15:16:54 +0100
commitebf16b4ddf0dcbadf96aebdec3304f703917fdc7 (patch)
treee4603d7bee0cd7062b4cb501e6f1ab0cc5148cf3 /firmware/src/dfu/dfu.h
parentebc2088382df3148a3b61f7108aa6ffccd7396be (diff)
usb: Do not send ZLP when we have filled the windowv0.4
Only send the ZLP if we send less data than was required/asked for by the host and it is a multiple of the bMaxPacketSize0 (which is hardcoded to 8 right now). This is completing the change done in fe88b83e80df8be0351ff38ee6 to fix SIMtrace attached to OSX and not regress on windows. Introduce another parameter to udp_ep0_send_data to specify the window size (wLength) or if not available the default from USB 2.0 specification.
Diffstat (limited to 'firmware/src/dfu/dfu.h')
-rw-r--r--firmware/src/dfu/dfu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/src/dfu/dfu.h b/firmware/src/dfu/dfu.h
index c898197..27c63b5 100644
--- a/firmware/src/dfu/dfu.h
+++ b/firmware/src/dfu/dfu.h
@@ -124,7 +124,7 @@ struct _dfu_desc {
struct dfuapi {
void (*udp_init)(void);
- void (*ep0_send_data)(const char *data, u_int32_t len);
+ void (*ep0_send_data)(const char *data, u_int32_t len, u_int32_t wlen);
void (*ep0_send_zlp)(void);
void (*ep0_send_stall)(void);
int (*dfu_ep0_handler)(u_int8_t req_type, u_int8_t req,
personal git repositories of Harald Welte. Your mileage may vary