aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/common/ad9361_ctrl.cpp
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2015-05-15 17:06:51 -0700
committerMartin Braun <martin.braun@ettus.com>2015-05-22 11:33:55 -0700
commitda7302cacbcdad59df01a7d7789db3c6fa9c6b24 (patch)
tree137b925f265572f59b4292cb4f2a26abf17dee1b /host/lib/usrp/common/ad9361_ctrl.cpp
parentc9af74e569d0d61a008f5bf0257c860b2b473381 (diff)
downloaduhd-da7302cacbcdad59df01a7d7789db3c6fa9c6b24.tar.gz
uhd-da7302cacbcdad59df01a7d7789db3c6fa9c6b24.tar.bz2
uhd-da7302cacbcdad59df01a7d7789db3c6fa9c6b24.zip
B200/E300: Fix incorrect readback of frequency.
When the LO is tuned it changes the frequency on both channels. The frequency value read back for the first channel was not updated when the LO frequency for the other channel was tuned to a different value.
Diffstat (limited to 'host/lib/usrp/common/ad9361_ctrl.cpp')
-rw-r--r--host/lib/usrp/common/ad9361_ctrl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/host/lib/usrp/common/ad9361_ctrl.cpp b/host/lib/usrp/common/ad9361_ctrl.cpp
index bedd2eb32..65e8e2df9 100644
--- a/host/lib/usrp/common/ad9361_ctrl.cpp
+++ b/host/lib/usrp/common/ad9361_ctrl.cpp
@@ -149,6 +149,15 @@ public:
return _device.tune(direction, value);
}
+ //! get the current frequency for the given frontend
+ double get_freq(const std::string &which)
+ {
+ boost::lock_guard<boost::mutex> lock(_mutex);
+
+ ad9361_device_t::direction_t direction = _get_direction_from_antenna(which);
+ return _device.get_freq(direction);
+ }
+
//! turn on/off data port loopback
void data_port_loopback(const bool on)
{