From bad6fb080b774c680f6d1eda4e1a00dad5a8cd20 Mon Sep 17 00:00:00 2001 From: Dimitri Stolnikov Date: Wed, 25 Apr 2012 22:32:51 +0200 Subject: introduce api to configure crystal oscillator frequency Usually both, the RTL and the tuner ICs use the same clock. Changing the clock may make sense if you are applying an external clock to the tuner or to compensate the frequency (and samplerate) error caused by the original cheap crystal. This commit covers all tuner drivers except of the Fitipower FC2580 --- src/tuner_fc2580.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/tuner_fc2580.c') diff --git a/src/tuner_fc2580.c b/src/tuner_fc2580.c index e562f4b..abf8513 100644 --- a/src/tuner_fc2580.c +++ b/src/tuner_fc2580.c @@ -23,7 +23,7 @@ fc2580_fci_result_type fc2580_i2c_write(void *pTuner, unsigned char reg, unsigne data[0] = reg; data[1] = val; - if (rtlsdr_i2c_write((rtlsdr_dev_t *)pTuner, FC2580_I2C_ADDR, data, 2) < 0) + if (rtlsdr_i2c_write_fn(pTuner, FC2580_I2C_ADDR, data, 2) < 0) return FC2580_FCI_FAIL; return FC2580_FCI_SUCCESS; @@ -33,10 +33,10 @@ fc2580_fci_result_type fc2580_i2c_read(void *pTuner, unsigned char reg, unsigned { uint8_t data = reg; - if (rtlsdr_i2c_write((rtlsdr_dev_t *)pTuner, FC2580_I2C_ADDR, &data, 1) < 0) + if (rtlsdr_i2c_write_fn(pTuner, FC2580_I2C_ADDR, &data, 1) < 0) return FC2580_FCI_FAIL; - if (rtlsdr_i2c_read((rtlsdr_dev_t *)pTuner, FC2580_I2C_ADDR, &data, 1) < 0) + if (rtlsdr_i2c_read_fn(pTuner, FC2580_I2C_ADDR, &data, 1) < 0) return FC2580_FCI_FAIL; *read_data = data; -- cgit v1.3.1