Skip to content

Commit 6290cdd

Browse files
author
Adrian Chadd
committed
[rtl_biast] Leave the bias-tee on after setting it.
1 parent b86b78c commit 6290cdd

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/rtl_biast.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,13 @@ int main(int argc, char **argv)
8383
}
8484

8585
r = rtlsdr_open(&dev, dev_index);
86+
87+
/* Flip on the bias tee on the given GPIO pin */
8688
rtlsdr_set_bias_tee_gpio(dev, gpio_pin, bias_on);
8789

88-
exit:
89-
/*
90-
* Note - rtlsdr_close() in this tree does not clear the bias tee
91-
* GPIO line, so it leaves the bias tee enabled if a client program
92-
* doesn't explictly disable it.
93-
*
94-
* If that behaviour changes then another rtlsdr_close() will be
95-
* needed that takes some extension flags, and one of them should
96-
* be to either explicitly close the biast or leave it alone.
97-
*/
90+
/* Ensure it stays on during rtlsdr_close() */
91+
rtlsdr_set_bias_tee_leave_on(dev, 1);
92+
9893
rtlsdr_close(dev);
9994

10095
return r >= 0 ? r : -r;

0 commit comments

Comments
 (0)