add debug messages to rtlsdr_read/write_array

Signed-off-by: Steve Markgraf <steve@steve-m.de>
master
Steve Markgraf 13 years ago
parent 42a6592e63
commit 9d0232385b
  1. 6
      src/librtlsdr.c

@ -279,6 +279,9 @@ int rtlsdr_read_array(rtlsdr_dev_t *dev, uint8_t block, uint16_t addr, uint8_t *
r = libusb_control_transfer(dev->devh, CTRL_IN, 0, addr, index, array, len, CTRL_TIMEOUT); r = libusb_control_transfer(dev->devh, CTRL_IN, 0, addr, index, array, len, CTRL_TIMEOUT);
if (r < 0)
fprintf(stderr, "%s failed with %d\n", __FUNCTION__, r);
return r; return r;
} }
@ -289,6 +292,9 @@ int rtlsdr_write_array(rtlsdr_dev_t *dev, uint8_t block, uint16_t addr, uint8_t
r = libusb_control_transfer(dev->devh, CTRL_OUT, 0, addr, index, array, len, CTRL_TIMEOUT); r = libusb_control_transfer(dev->devh, CTRL_OUT, 0, addr, index, array, len, CTRL_TIMEOUT);
if (r < 0)
fprintf(stderr, "%s failed with %d\n", __FUNCTION__, r);
return r; return r;
} }

Loading…
Cancel
Save