stuff starts to work now
This commit is contained in:
parent
00f11cd9d7
commit
6573bbb6da
|
@ -193,7 +193,7 @@ static int mehfet_getconfigfuses(device_t dev_base)
|
||||||
|
|
||||||
const struct device_class device_mehfet = {
|
const struct device_class device_mehfet = {
|
||||||
.name = "mehfet",
|
.name = "mehfet",
|
||||||
.help = "MehFET USB device",
|
.help = "MehFET USB JTAG/SBW device",
|
||||||
.open = mehfet_open,
|
.open = mehfet_open,
|
||||||
.destroy = mehfet_destroy,
|
.destroy = mehfet_destroy,
|
||||||
.readmem = mehfet_readmem,
|
.readmem = mehfet_readmem,
|
||||||
|
|
|
@ -155,18 +155,17 @@ static int tr_recv(transport_t tr_base, uint8_t *databuf, int max_len)
|
||||||
if (r <= 0) {
|
if (r <= 0) {
|
||||||
printc_err("mehfet transport: usb_bulk_read: %s\n",
|
printc_err("mehfet transport: usb_bulk_read: %s\n",
|
||||||
usb_strerror());
|
usb_strerror());
|
||||||
|
asm volatile("int3");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r > 2) {
|
memcpy(databuf, tmpbuf, r);
|
||||||
memcpy(databuf, tmpbuf, r);
|
|
||||||
#ifdef DEBUG_MEHFET_TRANSPORT
|
#ifdef DEBUG_MEHFET_TRANSPORT
|
||||||
printc_dbg("mehfet transport: tr_recv: flags = %02x %02x\n",
|
printc_dbg("mehfet transport: tr_recv: flags = %02x %02x\n",
|
||||||
tmpbuf[0], tmpbuf[1]);
|
tmpbuf[0], tmpbuf[1]);
|
||||||
debug_hexdump("mehfet transport: tr_recv", databuf, r);
|
debug_hexdump("mehfet transport: tr_recv", databuf, r);
|
||||||
#endif
|
#endif
|
||||||
return r;
|
return r;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printc_err("mehfet transport: timed out while receiving data\n");
|
printc_err("mehfet transport: timed out while receiving data\n");
|
||||||
|
|
|
@ -333,7 +333,7 @@ static int parse_cmdline_args(int argc, char **argv,
|
||||||
int opt;
|
int opt;
|
||||||
int want_usb = 0;
|
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)
|
longopts, NULL)) >= 0)
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'C':
|
case 'C':
|
||||||
|
|
Loading…
Reference in New Issue