From 300a5e3f6e5e845b4b8d093222e1c51ca4640f79 Mon Sep 17 00:00:00 2001 From: Brent Stapleton Date: Tue, 17 Apr 2018 19:33:23 -0700 Subject: mpm: initial commit of E320 code Co-authored-by: Sugandha Gupta --- host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp | 6 ++++++ host/lib/usrp/common/ad9361_ctrl.cpp | 15 +++++++++++++++ 2 files changed, 21 insertions(+) (limited to 'host/lib') diff --git a/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp b/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp index 1d9585d35..30c3987e1 100644 --- a/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp +++ b/host/lib/include/uhdlib/usrp/common/ad9361_ctrl.hpp @@ -50,6 +50,12 @@ public: uhd::spi_iface::sptr spi_iface, uint32_t slave_num ); + + static sptr make_spi( + ad9361_params::sptr client_settings, + ad9361_io::sptr spi_io_iface + ); + //! Get a list of gain names for RX or TX static std::vector get_gain_names(const std::string &/*which*/) { diff --git a/host/lib/usrp/common/ad9361_ctrl.cpp b/host/lib/usrp/common/ad9361_ctrl.cpp index b0bd73093..3cf89ad7a 100644 --- a/host/lib/usrp/common/ad9361_ctrl.cpp +++ b/host/lib/usrp/common/ad9361_ctrl.cpp @@ -212,6 +212,14 @@ public: _device.set_dc_offset_auto(direction,on); } + std::string get_lo_source(const std::string &which) + { + const auto dir = _get_direction_from_antenna(which); + //TODO: Implement this + boost::lock_guard lock(_mutex); + return "internal"; + } + void set_iq_balance_auto(const std::string &which, const bool on) { boost::lock_guard lock(_mutex); @@ -315,3 +323,10 @@ ad9361_ctrl::sptr ad9361_ctrl::make_spi( boost::shared_ptr spi_io_iface = boost::make_shared(spi_iface, slave_num); return sptr(new ad9361_ctrl_impl(client_settings, spi_io_iface)); } + +ad9361_ctrl::sptr ad9361_ctrl::make_spi( + ad9361_params::sptr client_settings, + ad9361_io::sptr spi_io_iface +) { + return sptr(new ad9361_ctrl_impl(client_settings, spi_io_iface)); +} -- cgit v1.2.3