diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-11-13 15:46:33 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 12:21:34 -0800 |
commit | 8b929b2d4e02ccd6318dac9c7c0a633f0cf60511 (patch) | |
tree | 83fd44ef4eb3197c580b6c0d1d87e3bb77ae533c /host/lib/usrp/dboard_eeprom.cpp | |
parent | 113b3262d3ac2995b5141180be70a0790fa553ed (diff) | |
download | uhd-8b929b2d4e02ccd6318dac9c7c0a633f0cf60511.tar.gz uhd-8b929b2d4e02ccd6318dac9c7c0a633f0cf60511.tar.bz2 uhd-8b929b2d4e02ccd6318dac9c7c0a633f0cf60511.zip |
gpio_atr_3000: Fix return value for pin control register
This fixes a bug where get_gpio_attr(bank, "CTRL") would return the
inverted value of what was written. Reason is that the underlying
register was an ATR disable register.
The fix is to invert the cached values of the register.
Now, the following Python code will work:
>>> U = uhd.usrp.MultiUSRP("type=x300")
>>> atr_enable = 0xF # Enable ATR on lower 4 pins, rest is GPIO
>>> U.set_gpio_attr("FP0A", "CTRL", atr_enable)
>>> U.get_gpio_attr("FP0A", "CTRL") == atr_enable
True
Diffstat (limited to 'host/lib/usrp/dboard_eeprom.cpp')
0 files changed, 0 insertions, 0 deletions