diff options
author | Johnathan Corgan | 2012-03-16 14:32:34 -0700 |
---|---|---|
committer | Johnathan Corgan | 2012-03-16 14:32:34 -0700 |
commit | 30adb8816974f1e4580ea5bb1ee27a9a12dbb78e (patch) | |
tree | 7c4bf664343c3cb5b067831169b624e1893c46ea /gr-uhd | |
parent | 62c6323bdb06d7d3f103d3a75265d45ae6ce00b4 (diff) | |
download | gnuradio-30adb8816974f1e4580ea5bb1ee27a9a12dbb78e.tar.gz gnuradio-30adb8816974f1e4580ea5bb1ee27a9a12dbb78e.tar.bz2 gnuradio-30adb8816974f1e4580ea5bb1ee27a9a12dbb78e.zip |
uhd: conditionalize set_user_register call on availability in UHD API
Diffstat (limited to 'gr-uhd')
-rw-r--r-- | gr-uhd/lib/gr_uhd_usrp_sink.cc | 6 | ||||
-rw-r--r-- | gr-uhd/lib/gr_uhd_usrp_source.cc | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gr-uhd/lib/gr_uhd_usrp_sink.cc b/gr-uhd/lib/gr_uhd_usrp_sink.cc index 8ff7c1f6e..7d173d972 100644 --- a/gr-uhd/lib/gr_uhd_usrp_sink.cc +++ b/gr-uhd/lib/gr_uhd_usrp_sink.cc @@ -279,7 +279,11 @@ public: } void set_user_register(const uint8_t addr, const uint32_t data, size_t mboard){ - _dev->set_user_register(addr, data, mboard); + #ifdef UHD_USRP_MULTI_USRP_USER_REGS_API + _dev->set_user_register(addr, data, mboard); + #else + throw std::runtime_error("not implemented in this version"); + #endif } diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc index 26cd0bf27..5d3a3321e 100644 --- a/gr-uhd/lib/gr_uhd_usrp_source.cc +++ b/gr-uhd/lib/gr_uhd_usrp_source.cc @@ -291,7 +291,11 @@ public: } void set_user_register(const uint8_t addr, const uint32_t data, size_t mboard){ - _dev->set_user_register(addr, data, mboard); + #ifdef UHD_USRP_MULTI_USRP_USER_REGS_API + _dev->set_user_register(addr, data, mboard); + #else + throw std::runtime_error("not implemented in this version"); + #endif } /*********************************************************************** |