lib: fix FC0012 reset GPIO

Since a typo in rtlsdr_set_gpio_output() was fixed,
FC0012 tuners were not detected anymore, as the reset pin
is actually 4, not 5.

Thanks to David Basden et al for reporting the bug.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
Steve Markgraf 2018-02-20 22:09:56 +01:00
parent a03198c5b7
commit 4520f001d8

View File

@ -1565,11 +1565,11 @@ int rtlsdr_open(rtlsdr_dev_t **out_dev, uint32_t index)
} }
/* initialise GPIOs */ /* initialise GPIOs */
rtlsdr_set_gpio_output(dev, 5); rtlsdr_set_gpio_output(dev, 4);
/* reset tuner before probing */ /* reset tuner before probing */
rtlsdr_set_gpio_bit(dev, 5, 1); rtlsdr_set_gpio_bit(dev, 4, 1);
rtlsdr_set_gpio_bit(dev, 5, 0); rtlsdr_set_gpio_bit(dev, 4, 0);
reg = rtlsdr_i2c_read_reg(dev, FC2580_I2C_ADDR, FC2580_CHECK_ADDR); reg = rtlsdr_i2c_read_reg(dev, FC2580_I2C_ADDR, FC2580_CHECK_ADDR);
if ((reg & 0x7f) == FC2580_CHECK_VAL) { if ((reg & 0x7f) == FC2580_CHECK_VAL) {