diff options
author | Trung N Tran <trung.n.tran@ni.com> | 2018-03-14 08:31:33 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-03-14 16:42:44 -0700 |
commit | 4844f66dccaa71da102b02bba7b8caf8f84a932c (patch) | |
tree | 77c12be4a61a4c5432f6af3087ffd03876d96c1f /host/lib/usrp/multi_usrp.cpp | |
parent | 0d162db46c2c237a10c202adb8bed4cab2f6d682 (diff) | |
download | uhd-4844f66dccaa71da102b02bba7b8caf8f84a932c.tar.gz uhd-4844f66dccaa71da102b02bba7b8caf8f84a932c.tar.bz2 uhd-4844f66dccaa71da102b02bba7b8caf8f84a932c.zip |
fixup! usrp: Add set_gpio_attr overload that use string
set_gpio_attr did not return after completion. This leads to wrong error
reporting.
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index b7d131bac..c08c6c0af 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -1913,6 +1913,7 @@ public: if (attr == gpio_atr::gpio_attr_map.at(gpio_atr::GPIO_SRC)){ throw uhd::runtime_error("Setting gpio source does not supported in daughter board."); } + return; } throw uhd::runtime_error(str(boost::format( "The hardware has no gpio bank: %s:\n") % bank)); @@ -1950,7 +1951,6 @@ public: } break; } - return; }else{ throw uhd::runtime_error(str(boost::format( @@ -1973,6 +1973,7 @@ public: if (attr == gpio_atr::gpio_attr_map.at(gpio_atr::GPIO_SRC)){ throw uhd::runtime_error("Setting gpio source does not supported in daughter board."); } + return; } throw uhd::runtime_error(str(boost::format("The hardware has no gpio bank: %s:\n") % bank)); } @@ -2001,7 +2002,6 @@ public: return uint32_t(_tree->access<uint64_t>(mb_root(mboard) / "gpio" / bank / attr).get()); } } - return 0; }else{ throw uhd::runtime_error(str(boost::format("The hardware has no gpio attribute: %s:\n") % attr)); |