mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2024-12-26 10:58:28 +01:00
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:
parent
a03198c5b7
commit
4520f001d8
@ -1565,11 +1565,11 @@ int rtlsdr_open(rtlsdr_dev_t **out_dev, uint32_t index)
|
||||
}
|
||||
|
||||
/* initialise GPIOs */
|
||||
rtlsdr_set_gpio_output(dev, 5);
|
||||
rtlsdr_set_gpio_output(dev, 4);
|
||||
|
||||
/* reset tuner before probing */
|
||||
rtlsdr_set_gpio_bit(dev, 5, 1);
|
||||
rtlsdr_set_gpio_bit(dev, 5, 0);
|
||||
rtlsdr_set_gpio_bit(dev, 4, 1);
|
||||
rtlsdr_set_gpio_bit(dev, 4, 0);
|
||||
|
||||
reg = rtlsdr_i2c_read_reg(dev, FC2580_I2C_ADDR, FC2580_CHECK_ADDR);
|
||||
if ((reg & 0x7f) == FC2580_CHECK_VAL) {
|
||||
|
Loading…
Reference in New Issue
Block a user