Sync USB data after each memory write command
authorKeith Packard <keithp@keithp.com>
Mon, 10 Aug 2009 03:43:10 +0000 (20:43 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 10 Aug 2009 03:43:10 +0000 (20:43 -0700)
This makes sure we flush the USB link often enough for the other end to keep
up.

Signed-off-by: Keith Packard <keithp@keithp.com>
cctools/lib/cc-usb.c

index 7eedbb473c0d83053118ec18094dad4466aecba5..81309983fd46b7487aaba7cabc005051373322be 100644 (file)
@@ -282,6 +282,7 @@ cc_usb_write_memory(struct cc_usb *cc, uint16_t addr, uint8_t *bytes, int len)
        cc_usb_printf(cc, "O %x %x\n", len, addr);
        while (len--)
                cc_usb_printf(cc, "%02x", *bytes++);
+       cc_usb_sync(cc);
        return 0;
 }