From db7039f8be4240b60cf2688d7ae6b41613fc8a5a Mon Sep 17 00:00:00 2001 From: Trung N Tran Date: Wed, 15 Nov 2017 13:49:39 -0800 Subject: mpm: enable RX external LO set through args This change allow user to set RX LO of ad9371 to external or internal from args constructor of usrp device. new args is rx_lo_source value can be either internal or external: If there's no rx_lo_source specified or invalid value, default rx_lo is used; which is internal LO. Usage example: usrp_application --args "rx_lo_source=external" --- mpm/lib/mykonos/config/ad937x_config_t.cpp | 13 ++++++++++++- mpm/lib/mykonos/config/ad937x_config_t.hpp | 5 ++++- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'mpm/lib/mykonos/config') diff --git a/mpm/lib/mykonos/config/ad937x_config_t.cpp b/mpm/lib/mykonos/config/ad937x_config_t.cpp index 8a7ca76c3..68d1f27bf 100644 --- a/mpm/lib/mykonos/config/ad937x_config_t.cpp +++ b/mpm/lib/mykonos/config/ad937x_config_t.cpp @@ -83,7 +83,18 @@ ad937x_config_t::ad937x_config_t(spiSettings_t* sps) : device = &_device; } - +void ad937x_config_t::set_rx_pll_use_external_lo(uint8_t val){ + _rx.rxPllUseExternalLo = val; +} +uint8_t ad937x_config_t::get_rx_pll_use_external_lo(){ + return _rx.rxPllUseExternalLo; +} +void ad937x_config_t::set_tx_pll_use_external_lo(uint8_t val){ + _tx.txPllUseExternalLo = val; +} +uint8_t ad937x_config_t::get_tx_pll_use_external_lo(){ + return _tx.txPllUseExternalLo; +} // This function sets up all the pointers in all of our local members that represent the device struct // This function should only be called during construction. void ad937x_config_t::_init_pointers() diff --git a/mpm/lib/mykonos/config/ad937x_config_t.hpp b/mpm/lib/mykonos/config/ad937x_config_t.hpp index 9eba4992f..e44039ebe 100644 --- a/mpm/lib/mykonos/config/ad937x_config_t.hpp +++ b/mpm/lib/mykonos/config/ad937x_config_t.hpp @@ -20,7 +20,6 @@ #include "../adi/t_mykonos.h" #include "ad937x_fir.hpp" #include - // Allocates and links the entire mykonos config struct in a single class class ad937x_config_t : public boost::noncopyable { @@ -41,6 +40,10 @@ public: static const int16_t DEFAULT_RX_FIR[DEFAULT_RX_FIR_SIZE]; static const int16_t DEFAULT_OBSRX_FIR[DEFAULT_RX_FIR_SIZE]; static const int16_t DEFAULT_SNIFFER_FIR[DEFAULT_RX_FIR_SIZE]; + void set_rx_pll_use_external_lo(uint8_t val); + uint8_t get_rx_pll_use_external_lo(); + void set_tx_pll_use_external_lo(uint8_t val); + uint8_t get_tx_pll_use_external_lo(); private: // The top level device struct is non-const and contains all other structs, so everything is "public" -- cgit v1.2.3