lib: fix direction bit in GPIO code

source: http://lea.hamradio.si/~s57uuu/mischam/rtlsdr/ports.html

* Removed unnecessary comment of old code.
Signed-off-by: Fabian P. Schmidt <kerel-fs@gmx.de>
Signed-off-by: Steve Markgraf <steve@steve-m.de>
master
Lucas Teske 8 years ago committed by Steve Markgraf
parent e3e6ee23b7
commit ba64a7459a
  1. 2
      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, GPO, r & ~gpio, 1);
rtlsdr_write_reg(dev, SYSB, GPD, r & ~gpio, 1);
r = rtlsdr_read_reg(dev, SYSB, GPOE, 1);
rtlsdr_write_reg(dev, SYSB, GPOE, r | gpio, 1);
}

Loading…
Cancel
Save