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>
This commit is contained in:
Lucas Teske 2016-08-17 20:31:33 -03:00 committed by Steve Markgraf
parent e3e6ee23b7
commit ba64a7459a

View File

@ -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);
}