From e14cb99a9d33ff780388d6a8230b625974b47629 Mon Sep 17 00:00:00 2001 From: hayati ayguen Date: Wed, 31 Aug 2016 00:10:12 +0200 Subject: [PATCH] deactivate bias-T with rtlsdr_close() bias-T voltage was staying on when rtl_* tool ended! Signed-off-by: hayati ayguen --- src/librtlsdr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/librtlsdr.c b/src/librtlsdr.c index 9120ca5..f4eb9d3 100644 --- a/src/librtlsdr.c +++ b/src/librtlsdr.c @@ -1947,6 +1947,9 @@ int rtlsdr_close(rtlsdr_dev_t *dev) if (!dev) return -1; + /* automatic de-activation of bias-T */ + rtlsdr_set_bias_tee(dev, 0); + if(!dev->dev_lost) { /* block until all async operations have been completed (if any) */ while (RTLSDR_INACTIVE != dev->async_status) { @@ -2445,4 +2448,4 @@ int rtlsdr_set_bias_tee(rtlsdr_dev_t *dev, int on) { rtlsdr_set_gpio_bit(dev, 0, on); return 1; -} \ No newline at end of file +}