lib: Use GPIO P0 to toggle an (optional) bias-t

At least one distributor of rtl-sdr dongles (rtl-sdr.com) added
a bias-t to their dongles which could be toggled via GPIO P0 of the
RTL2832U chip.

source: http://www.rtl-sdr.com/rtl-sdr-blog-v-3-dongles-user-guide/

Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
Lucas Teske
2016-08-17 10:14:57 -03:00
committed by Steve Markgraf
parent ba64a7459a
commit 2be1612e60
2 changed files with 20 additions and 0 deletions

View File

@ -380,6 +380,15 @@ RTLSDR_API int rtlsdr_read_async(rtlsdr_dev_t *dev,
*/
RTLSDR_API int rtlsdr_cancel_async(rtlsdr_dev_t *dev);
/*!
* Enable or disable the bias tee on GPIO PIN 0.
*
* \param dev the device handle given by rtlsdr_open()
* \param on 1 for Bias T on. 0 for Bias T off.
* \return -1 if device is not initialized. 0 otherwise.
*/
RTLSDR_API int rtlsdr_set_bias_tee(rtlsdr_dev_t *dev, int on);
#ifdef __cplusplus
}
#endif