|
|
@ -279,10 +279,10 @@ int rtlsdr_read_array(rtlsdr_dev_t *dev, uint8_t block, uint16_t addr, uint8_t * |
|
|
|
uint16_t index = (block << 8); |
|
|
|
uint16_t index = (block << 8); |
|
|
|
|
|
|
|
|
|
|
|
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 0 |
|
|
|
if (r < 0) |
|
|
|
if (r < 0) |
|
|
|
fprintf(stderr, "%s failed with %d\n", __FUNCTION__, r); |
|
|
|
fprintf(stderr, "%s failed with %d\n", __FUNCTION__, r); |
|
|
|
|
|
|
|
#endif |
|
|
|
return r; |
|
|
|
return r; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -292,10 +292,10 @@ int rtlsdr_write_array(rtlsdr_dev_t *dev, uint8_t block, uint16_t addr, uint8_t |
|
|
|
uint16_t index = (block << 8) | 0x10; |
|
|
|
uint16_t index = (block << 8) | 0x10; |
|
|
|
|
|
|
|
|
|
|
|
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 0 |
|
|
|
if (r < 0) |
|
|
|
if (r < 0) |
|
|
|
fprintf(stderr, "%s failed with %d\n", __FUNCTION__, r); |
|
|
|
fprintf(stderr, "%s failed with %d\n", __FUNCTION__, r); |
|
|
|
|
|
|
|
#endif |
|
|
|
return r; |
|
|
|
return r; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|