add blog v4 upconverter gpio switch
In future blog v4 production batches (out in several months time), it will be possible to turn off the upconverter when tuned outside of the HF bands. The code controls the GPIOs to turn off the upconverter when it is not in use.
This commit is contained in:
parent
178267c399
commit
138cd052f5
|
@ -2,6 +2,7 @@
|
|||
#define __I2C_H
|
||||
|
||||
int rtlsdr_check_dongle_model(void *dev, char *manufact_check, char *product_check);
|
||||
int rtlsdr_set_bias_tee_gpio(void *dev, int gpio, int on);
|
||||
uint32_t rtlsdr_get_tuner_clock(void *dev);
|
||||
int rtlsdr_i2c_write_fn(void *dev, uint8_t addr, uint8_t *buf, int len);
|
||||
int rtlsdr_i2c_read_fn(void *dev, uint8_t addr, uint8_t *buf, int len);
|
||||
|
|
|
@ -1151,6 +1151,12 @@ int r82xx_set_freq(struct r82xx_priv *priv, uint32_t freq)
|
|||
cable_2_in = (band == HF) ? 0x08 : 0x00;
|
||||
rc = r82xx_write_reg_mask(priv, 0x06, cable_2_in, 0x08);
|
||||
|
||||
if (rc < 0)
|
||||
goto err;
|
||||
|
||||
/* Control upconverter GPIO switch on newer batches */
|
||||
rc = rtlsdr_set_bias_tee_gpio(priv->rtl_dev, 5, !cable_2_in);
|
||||
|
||||
if (rc < 0)
|
||||
goto err;
|
||||
|
||||
|
|
Loading…
Reference in New Issue