summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2012-07-08 15:52:59 +0200
committerDimitri Stolnikov <horiz0n@gmx.net>2012-07-08 15:52:59 +0200
commitf9b5d7b0a66b39d307334bb84a5ffa6b3171f7b8 (patch)
tree995982c5b16ba07af916d9aa12b09726ff300dd1 /include
parent7dc15d9fd74c870c4528f3d6482b90056f94c43b (diff)
apply frequency correction value on the xtal clock directly
by using this approach both, the tuning frequency and the sample rate should be corrected at the same time.
Diffstat (limited to 'include')
-rw-r--r--include/rtl-sdr.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/rtl-sdr.h b/include/rtl-sdr.h
index 7de8455..ec0b4c8 100644
--- a/include/rtl-sdr.h
+++ b/include/rtl-sdr.h
@@ -60,9 +60,9 @@ RTLSDR_API int rtlsdr_close(rtlsdr_dev_t *dev);
*
* Usually both 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.
+ * frequency (and samplerate) error caused by the original (cheap) crystal.
*
- * NOTE: Call this function only if you know what you are doing.
+ * NOTE: Call this function only if you fully understand the implications.
*
* \param dev the device handle given by rtlsdr_open()
* \param rtl_freq frequency value used to clock the RTL2832 in Hz
@@ -109,8 +109,21 @@ RTLSDR_API int rtlsdr_set_center_freq(rtlsdr_dev_t *dev, uint32_t freq);
*/
RTLSDR_API uint32_t rtlsdr_get_center_freq(rtlsdr_dev_t *dev);
+/*!
+ * Set the frequency correction value for the device.
+ *
+ * \param dev the device handle given by rtlsdr_open()
+ * \param ppm correction value in parts per million (ppm)
+ * \return 0 on success
+ */
RTLSDR_API int rtlsdr_set_freq_correction(rtlsdr_dev_t *dev, int ppm);
+/*!
+ * Get actual frequency correction value of the device.
+ *
+ * \param dev the device handle given by rtlsdr_open()
+ * \return correction value in parts per million (ppm)
+ */
RTLSDR_API int rtlsdr_get_freq_correction(rtlsdr_dev_t *dev);
enum rtlsdr_tuner {