ret = libusb_control_transfer(devh, CTRL_OUT, 0xc, REQ_WRITEADDR,
0, packet, 1, TIMEOUT);
if (ret != 1)
- printf("%s: libusb_control_transfer returned %d\n",
+ sr_err("%s: libusb_control_transfer returned %d\n",
__FUNCTION__, ret);
return ret;
}
ret = libusb_control_transfer(devh, CTRL_OUT, 0xc, REQ_WRITEDATA,
0, packet, 1, TIMEOUT);
if (ret != 1)
- printf("%s: libusb_control_transfer returned %d\n",
+ sr_err("%s: libusb_control_transfer returned %d\n",
__FUNCTION__, ret);
return ret;
}
ret = libusb_control_transfer(devh, CTRL_IN, 0xc, REQ_READDATA,
0, packet, 1, TIMEOUT);
if (ret != 1)
- printf("%s: libusb_control_transfer returned %d, val=%hhx\n",
+ sr_err("%s: libusb_control_transfer returned %d, val=%hhx\n",
__FUNCTION__, ret, packet[0]);
return (ret == 1) ? packet[0] : ret;
}
ret = libusb_control_transfer(devh, CTRL_OUT, 0x4, REQ_READBULK,
0, packet, 8, TIMEOUT);
if (ret != 8)
- printf("%s: libusb_control_transfer returned %d\n",
+ sr_err("%s: libusb_control_transfer returned %d\n",
__FUNCTION__, ret);
ret = libusb_bulk_transfer(devh, ENDPOINT_BULK_IN, buffer, size,
&transferred, TIMEOUT);
if (ret < 0)
- fprintf(stderr, "Bulk read error %d\n", ret);
+ sr_err("Bulk read error %d\n", ret);
return transferred;
}
}
if (probenum < 1 || probenum > max_probes) {
- printf("Invalid probe.\n");
+ sr_err("Invalid probe.\n");
error = TRUE;
break;
}
if ((trigger = strchr(tokens[i], '='))) {
for (tc = ++trigger; *tc; tc++) {
if (strchr(trigger_types, *tc) == NULL) {
- printf("Unsupported trigger type "
+ sr_err("Unsupported trigger type "
"'%c'\n", *tc);
error = TRUE;
break;