stuff starts to work now

This commit is contained in:
Triss 2021-10-05 23:23:50 +02:00
parent 00f11cd9d7
commit 6573bbb6da
3 changed files with 8 additions and 9 deletions

View File

@ -193,7 +193,7 @@ static int mehfet_getconfigfuses(device_t dev_base)
const struct device_class device_mehfet = {
.name = "mehfet",
.help = "MehFET USB device",
.help = "MehFET USB JTAG/SBW device",
.open = mehfet_open,
.destroy = mehfet_destroy,
.readmem = mehfet_readmem,

View File

@ -155,18 +155,17 @@ static int tr_recv(transport_t tr_base, uint8_t *databuf, int max_len)
if (r <= 0) {
printc_err("mehfet transport: usb_bulk_read: %s\n",
usb_strerror());
asm volatile("int3");
return -1;
}
if (r > 2) {
memcpy(databuf, tmpbuf, r);
memcpy(databuf, tmpbuf, r);
#ifdef DEBUG_MEHFET_TRANSPORT
printc_dbg("mehfet transport: tr_recv: flags = %02x %02x\n",
tmpbuf[0], tmpbuf[1]);
debug_hexdump("mehfet transport: tr_recv", databuf, r);
printc_dbg("mehfet transport: tr_recv: flags = %02x %02x\n",
tmpbuf[0], tmpbuf[1]);
debug_hexdump("mehfet transport: tr_recv", databuf, r);
#endif
return r;
}
return r;
}
printc_err("mehfet transport: timed out while receiving data\n");

View File

@ -333,7 +333,7 @@ static int parse_cmdline_args(int argc, char **argv,
int opt;
int want_usb = 0;
while ((opt = getopt_long(argc, argv, "d:jv:nU:s:qC:",
while ((opt = getopt_long(argc, argv, "d:jv:nUV:s:qC:",
longopts, NULL)) >= 0)
switch (opt) {
case 'C':