mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2024-11-06 10:47:35 +01:00
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:
parent
e3e6ee23b7
commit
ba64a7459a
@ -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…
Reference in New Issue
Block a user