Browse Source

stuff starts to work now

mehfet
sys64738 2 months ago
parent
commit
6573bbb6da
  1. 2
      drivers/mehfet.c
  2. 13
      transport/mehfet_xport.c
  3. 2
      ui/main.c

2
drivers/mehfet.c

@ -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,

13
transport/mehfet_xport.c

@ -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");

2
ui/main.c

@ -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':

Loading…
Cancel
Save