[PATCH] Revert "lib: fix direction bit in GPIO code"

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-sdr@lists.osmocom.org/.

Sylvain Munaut 246tnt at gmail.com
Fri Oct 27 16:09:18 UTC 2017


That commit might break something but it still looks like the right thing to do.
This is just a symptom of another underlying problem. Find that
problem and fix it.


On Fri, Oct 27, 2017 at 5:03 PM, Marcus Müller <mueller at kit.edu> wrote:
> This reverts commit ba64a7459a43652354990855176a7d8dad5b9d54.
>
> The mentioned commit leads to nonfunctionality of Fitipower FC0012
> dongles (tested by a small horde of students) and doesn't increase
> functionality on my "RTL-SDR.com" branded R820T-based dongle.
> ---
>  src/librtlsdr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/librtlsdr.c b/src/librtlsdr.c
> index b369a5d..6c079a5 100644
> --- a/src/librtlsdr.c
> +++ b/src/librtlsdr.c
> @@ -570,7 +570,7 @@ void rtlsdr_set_gpio_output(rtlsdr_dev_t *dev, uint8_t gpio)
>         gpio = 1 << gpio;
>
>         r = rtlsdr_read_reg(dev, SYSB, GPD, 1);
> -       rtlsdr_write_reg(dev, SYSB, GPD, r & ~gpio, 1);
> +       rtlsdr_write_reg(dev, SYSB, GPO, r & ~gpio, 1);
>         r = rtlsdr_read_reg(dev, SYSB, GPOE, 1);
>         rtlsdr_write_reg(dev, SYSB, GPOE, r | gpio, 1);
>  }
> --
> 2.13.6
>



More information about the osmocom-sdr mailing list