From 6d332e5ca4a7311406ac285f827c31c9e5b94280 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 23 Mar 2017 15:40:28 -0700 Subject: mpm: move public includes into include/ --- mpm/lib/mykonos/ad937x_ctrl.cpp | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'mpm/lib/mykonos/ad937x_ctrl.cpp') 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 @@ -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 lock(*spi_l); -- cgit v1.2.3