summaryrefslogtreecommitdiff
path: root/xpp
diff options
context:
space:
mode:
Diffstat (limited to 'xpp')
-rw-r--r--xpp/utils/fpga_load.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xpp/utils/fpga_load.c b/xpp/utils/fpga_load.c
index 0f44340..e4d4e91 100644
--- a/xpp/utils/fpga_load.c
+++ b/xpp/utils/fpga_load.c
@@ -313,7 +313,7 @@ int send_hexline(struct usb_dev_handle *handle, struct hexline *hexline, int seq
phead->d.data_packet.seq = seq;
phead->d.data_packet.reserved = 0x00;
memcpy(phead->d.data_packet.data, data, len);
- len += sizeof(phead);
+ len += sizeof(hexline->d.content.header);
if(verbose >= LOG_INFO)
INFO("%04d+\r", seq);
ret = usb_bulk_write(handle, MY_EP_OUT, (char *)phead, len, TIMEOUT);
@@ -324,6 +324,8 @@ int send_hexline(struct usb_dev_handle *handle, struct hexline *hexline, int seq
ERR("usb: bulk_write short write (%d)\n", ret);
return -EFAULT;
}
+ if (verbose >= LOG_DEBUG)
+ dump_packet((char*)phead, len);
ret = usb_bulk_read(handle, MY_EP_IN, buf, sizeof(buf), TIMEOUT);
if(ret < 0) {
ERR("usb: bulk_read failed (%d)\n", ret);