summaryrefslogtreecommitdiff
path: root/include/rtl-sdr.h
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2012-04-24 20:02:53 +0200
committerDimitri Stolnikov <horiz0n@gmx.net>2012-04-24 20:02:53 +0200
commit5f70efd8d1284ed02b2423d0ba470ff3fbaec75b (patch)
treeb0aa31805a2dc7dfb54dedf0e853c781307f587f /include/rtl-sdr.h
parent680fe5de037c32ed9768232acb1b027ab10da9f3 (diff)
return frequency and sample rate as unsigned integers
Diffstat (limited to 'include/rtl-sdr.h')
-rw-r--r--include/rtl-sdr.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/rtl-sdr.h b/include/rtl-sdr.h
index 14689cc..8a6dd38 100644
--- a/include/rtl-sdr.h
+++ b/include/rtl-sdr.h
@@ -41,7 +41,13 @@ RTLSDR_API int rtlsdr_close(rtlsdr_dev_t *dev);
RTLSDR_API int rtlsdr_set_center_freq(rtlsdr_dev_t *dev, uint32_t freq);
-RTLSDR_API int rtlsdr_get_center_freq(rtlsdr_dev_t *dev);
+/*!
+ * Get actual frequency the device is tuned to.
+ *
+ * \param dev the device handle given by rtlsdr_open()
+ * \return 0 on error, frequency in Hz otherwise
+ */
+RTLSDR_API uint32_t rtlsdr_get_center_freq(rtlsdr_dev_t *dev);
RTLSDR_API int rtlsdr_set_freq_correction(rtlsdr_dev_t *dev, int ppm);
@@ -54,7 +60,13 @@ RTLSDR_API int rtlsdr_get_tuner_gain(rtlsdr_dev_t *dev);
/* this will select the baseband filters according to the requested sample rate */
RTLSDR_API int rtlsdr_set_sample_rate(rtlsdr_dev_t *dev, uint32_t rate);
-RTLSDR_API int rtlsdr_get_sample_rate(rtlsdr_dev_t *dev);
+/*!
+ * Get actual sample rate the device is configured to.
+ *
+ * \param dev the device handle given by rtlsdr_open()
+ * \return 0 on error, sample rate in Hz otherwise
+ */
+RTLSDR_API uint32_t rtlsdr_get_sample_rate(rtlsdr_dev_t *dev);
/* streaming functions */