aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/lib/mykonos/ad937x_ctrl.cpp
diff options
context:
space:
mode:
authorMark Meserve <mark.meserve@ni.com>2017-09-01 15:18:39 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:04:01 -0800
commit04b0f414b9235d36e7572b8c6644630d77de4aab (patch)
treeb3ae594a9fc272b558e2dfc4464e318bbdf4b1e6 /mpm/lib/mykonos/ad937x_ctrl.cpp
parent01ddd50e55fae3382c1300616747fc9aebb39523 (diff)
downloaduhd-04b0f414b9235d36e7572b8c6644630d77de4aab.tar.gz
uhd-04b0f414b9235d36e7572b8c6644630d77de4aab.tar.bz2
uhd-04b0f414b9235d36e7572b8c6644630d77de4aab.zip
mpm: ad937x: Updated controls
Diffstat (limited to 'mpm/lib/mykonos/ad937x_ctrl.cpp')
-rw-r--r--mpm/lib/mykonos/ad937x_ctrl.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/mpm/lib/mykonos/ad937x_ctrl.cpp b/mpm/lib/mykonos/ad937x_ctrl.cpp
index 55479fb1d..d859195bc 100644
--- a/mpm/lib/mykonos/ad937x_ctrl.cpp
+++ b/mpm/lib/mykonos/ad937x_ctrl.cpp
@@ -157,6 +157,18 @@ public:
device.start_jesd_tx();
}
+ virtual void start_radio()
+ {
+ std::lock_guard<std::mutex> lock(*spi_mutex);
+ device.start_radio();
+ }
+
+ virtual void stop_radio()
+ {
+ std::lock_guard<std::mutex> lock(*spi_mutex);
+ device.stop_radio();
+ }
+
virtual uint8_t get_multichip_sync_status()
{
std::lock_guard<std::mutex> lock(*spi_mutex);
@@ -236,6 +248,15 @@ public:
return device.set_gain(dir, chain, value);
}
+ virtual double get_gain(const std::string &which)
+ {
+ auto dir = _get_direction_from_antenna(which);
+ auto chain = _get_chain_from_antenna(which);
+
+ std::lock_guard<std::mutex> lock(*spi_mutex);
+ return device.get_gain(dir, chain);
+ }
+
// TODO: does agc mode need to have a which parameter?
// this affects all RX channels on the device
virtual void set_agc_mode(const std::string &which, const std::string &mode)