diff options
author | Julian Arnold <julian.arnold@ettus.com> | 2015-02-20 10:51:45 -0800 |
---|---|---|
committer | Julian Arnold <julian.arnold@ettus.com> | 2015-02-20 11:01:00 -0800 |
commit | 2b06c3815551c99d7691a7aa3dbcf6eaedc9e998 (patch) | |
tree | cd18e178c980b91d467de20ccb06a362a6a55987 /host/lib/usrp/common/ad9361_ctrl.cpp | |
parent | 4602ea9148e5e36fefca6402b7dcc5a1104e7410 (diff) | |
download | uhd-2b06c3815551c99d7691a7aa3dbcf6eaedc9e998.tar.gz uhd-2b06c3815551c99d7691a7aa3dbcf6eaedc9e998.tar.bz2 uhd-2b06c3815551c99d7691a7aa3dbcf6eaedc9e998.zip |
b2xx: dc offset and iq imbalance correction control
Diffstat (limited to 'host/lib/usrp/common/ad9361_ctrl.cpp')
-rw-r--r-- | host/lib/usrp/common/ad9361_ctrl.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/host/lib/usrp/common/ad9361_ctrl.cpp b/host/lib/usrp/common/ad9361_ctrl.cpp index 3db6739e7..4a3c17cf1 100644 --- a/host/lib/usrp/common/ad9361_ctrl.cpp +++ b/host/lib/usrp/common/ad9361_ctrl.cpp @@ -178,6 +178,34 @@ public: return sensor_value_t("temp", _device.get_average_temperature(), "C"); } + void set_dc_offset_auto(const std::string &which, const bool on) + { + boost::lock_guard<boost::mutex> lock(_mutex); + + ad9361_device_t::direction_t direction = _get_direction_from_antenna(which); + _device.set_dc_offset_auto(direction,on); + } + + void set_dc_offset(const std::string &which, const std::complex<double> value) + { + //This feature should not be used according to Analog Devices + throw uhd::runtime_error("ad9361_ctrl::set_dc_offset this feature is not supported on this device."); + } + + void set_iq_balance_auto(const std::string &which, const bool on) + { + boost::lock_guard<boost::mutex> lock(_mutex); + + ad9361_device_t::direction_t direction = _get_direction_from_antenna(which); + _device.set_iq_balance_auto(direction,on); + } + + void set_iq_balance(const std::string &which, const std::complex<double> value) + { + //This feature should not be used according to Analog Devices + throw uhd::runtime_error("ad9361_ctrl::set_iq_balance this feature is not supported on this device."); + } + private: static ad9361_device_t::direction_t _get_direction_from_antenna(const std::string& antenna) { |