diff options
author | Derek Kozel <derek.kozel@ettus.com> | 2018-07-10 16:51:14 +0000 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-07-11 10:12:03 -0700 |
commit | b39358f490a24ffe4b8b29227736b8d2eb40b956 (patch) | |
tree | 57ae22193cd0a9ee95c8b3f73d938b167b1c6675 /host/lib/usrp/multi_usrp.cpp | |
parent | b185c9447a4a33bff14fd697dc294b9ee5d298b3 (diff) | |
download | uhd-b39358f490a24ffe4b8b29227736b8d2eb40b956.tar.gz uhd-b39358f490a24ffe4b8b29227736b8d2eb40b956.tar.bz2 uhd-b39358f490a24ffe4b8b29227736b8d2eb40b956.zip |
uhd: Expose DC Offset range via multi_usrp interface
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 48da5023b..1d8a0fd7a 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -1541,6 +1541,15 @@ public: } } + meta_range_t get_rx_dc_offset_range(size_t chan) { + if (_tree->exists(rx_fe_root(chan) / "dc_offset" / "range")) { + return _tree->access<uhd::meta_range_t>(rx_fe_root(chan) / "dc_offset" / "range").get(); + } else { + UHD_LOGGER_WARNING("MULTI_USRP") << "This device does not support querying the RX DC offset range." ; + return meta_range_t(0, 0); + } + } + void set_rx_iq_balance(const bool enb, size_t chan){ if (chan != ALL_CHANS){ if (_tree->exists(rx_rf_fe_root(chan) / "iq_balance" / "enable")) { @@ -1912,6 +1921,15 @@ public: } } + meta_range_t get_tx_dc_offset_range(size_t chan) { + if (_tree->exists(tx_fe_root(chan) / "dc_offset" / "range")) { + return _tree->access<uhd::meta_range_t>(tx_fe_root(chan) / "dc_offset" / "range").get(); + } else { + UHD_LOGGER_WARNING("MULTI_USRP") << "This device does not support querying the TX DC offset range." ; + return meta_range_t(0, 0); + } + } + void set_tx_iq_balance(const std::complex<double> &offset, size_t chan){ if (chan != ALL_CHANS){ if (_tree->exists(tx_fe_root(chan) / "iq_balance" / "value")) { |