Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
deactivate bias-T with rtlsdr_close()
Browse files Browse the repository at this point in the history
bias-T voltage was staying on when rtl_* tool ended!

Signed-off-by: hayati ayguen <[email protected]>
  • Loading branch information
hayguen committed Aug 30, 2016
1 parent 9d53847 commit e14cb99
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/librtlsdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -2445,4 +2448,4 @@ int rtlsdr_set_bias_tee(rtlsdr_dev_t *dev, int on) {
rtlsdr_set_gpio_bit(dev, 0, on);

return 1;
}
}

0 comments on commit e14cb99

Please sign in to comment.