aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/lib/mykonos/ad937x_ctrl.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-03-23 15:40:28 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:03:44 -0800
commit6d332e5ca4a7311406ac285f827c31c9e5b94280 (patch)
tree77098d97db8e8884124d66617721724821a80ced /mpm/lib/mykonos/ad937x_ctrl.cpp
parentef6326a174e6880be5e2eaeac26a2c5de0768807 (diff)
downloaduhd-6d332e5ca4a7311406ac285f827c31c9e5b94280.tar.gz
uhd-6d332e5ca4a7311406ac285f827c31c9e5b94280.tar.bz2
uhd-6d332e5ca4a7311406ac285f827c31c9e5b94280.zip
mpm: move public includes into include/
Diffstat (limited to 'mpm/lib/mykonos/ad937x_ctrl.cpp')
-rw-r--r--mpm/lib/mykonos/ad937x_ctrl.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/mpm/lib/mykonos/ad937x_ctrl.cpp b/mpm/lib/mykonos/ad937x_ctrl.cpp
index 1aff4ed42..c4343a2e6 100644
--- a/mpm/lib/mykonos/ad937x_ctrl.cpp
+++ b/mpm/lib/mykonos/ad937x_ctrl.cpp
@@ -16,7 +16,7 @@
//
#include "ad937x_device.hpp"
-#include "ad937x_ctrl.hpp"
+#include "mpm/mykonos/ad937x_ctrl.hpp"
#include "adi/mykonos.h"
#include <sstream>
@@ -85,21 +85,6 @@ uhd::direction_t ad937x_ctrl::_get_direction_from_antenna(const std::string& ant
return uhd::direction_t::RX_DIRECTION;
}
-ad937x_device::chain_t ad937x_ctrl::_get_chain_from_antenna(const std::string& antenna)
-{
- auto sub = antenna.substr(2, 1);
- if (sub == "1") {
- return ad937x_device::chain_t::ONE;
- }
- else if (sub == "2") {
- return ad937x_device::chain_t::TWO;
- }
- else {
- throw uhd::runtime_error("ad937x_ctrl got an invalid channel string.");
- }
- return ad937x_device::chain_t::ONE;
-}
-
class ad937x_ctrl_impl : public ad937x_ctrl
{
public:
@@ -110,6 +95,23 @@ public:
}
+ static ad937x_device::chain_t _get_chain_from_antenna(const std::string& antenna)
+ {
+ auto sub = antenna.substr(2, 1);
+ if (sub == "1") {
+ return ad937x_device::chain_t::ONE;
+ }
+ else if (sub == "2") {
+ return ad937x_device::chain_t::TWO;
+ }
+ else {
+ throw uhd::runtime_error("ad937x_ctrl got an invalid channel string.");
+ }
+ return ad937x_device::chain_t::ONE;
+ }
+
+
+
virtual uint8_t get_product_id()
{
std::lock_guard<spi_lock> lock(*spi_l);