lib: Add GPIO version of the bias tee configuration API

rtl_biast allows for non-default GPIO pins to be used.
Add an API call which allows for that.
This commit is contained in:
Adrian Chadd
2019-08-31 21:37:36 -07:00
committed by Steve Markgraf
parent 9d05150a64
commit 5d0735f5df
2 changed files with 19 additions and 3 deletions

View File

@ -389,6 +389,17 @@ RTLSDR_API int rtlsdr_cancel_async(rtlsdr_dev_t *dev);
*/
RTLSDR_API int rtlsdr_set_bias_tee(rtlsdr_dev_t *dev, int on);
/*!
* Enable or disable the bias tee on the given GPIO pin.
*
* \param dev the device handle given by rtlsdr_open()
* \param gpio the gpio pin to configure as a Bias T control.
* \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_gpio(rtlsdr_dev_t *dev, int gpio, int on);
#ifdef __cplusplus
}
#endif