add an initial version of rtl_test

This tool allows to check for lost samples (and thus check the USB
connection), as well as benchmark the Elonics E4000 tunable range.
(-t switch)

Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
Steve Markgraf
2012-05-17 23:51:59 +02:00
parent 73f54be2ed
commit fdc7bc978b
5 changed files with 322 additions and 2 deletions

View File

@ -726,6 +726,16 @@ uint32_t rtlsdr_get_sample_rate(rtlsdr_dev_t *dev)
return dev->rate;
}
int rtlsdr_set_testmode(rtlsdr_dev_t *dev, int on)
{
if (!dev)
return -1;
rtlsdr_demod_write_reg(dev, 0, 0x19, on ? 0x23 : 0x25 , 1);
return 0;
}
rtlsdr_dongle_t *find_known_device(uint16_t vid, uint16_t pid)
{
unsigned int i;