diff options
author | Trung N Tran <trung.tran@ettus.com> | 2017-11-15 13:49:39 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:05:06 -0800 |
commit | db7039f8be4240b60cf2688d7ae6b41613fc8a5a (patch) | |
tree | 7f1de9ea37847d8071814f6c75c2da50ae5e7ff6 /mpm/lib/mykonos/ad937x_device.cpp | |
parent | 9ea0d6da9e3756af91c7d1e99ee35e56bf2270d6 (diff) | |
download | uhd-db7039f8be4240b60cf2688d7ae6b41613fc8a5a.tar.gz uhd-db7039f8be4240b60cf2688d7ae6b41613fc8a5a.tar.bz2 uhd-db7039f8be4240b60cf2688d7ae6b41613fc8a5a.zip |
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"
Diffstat (limited to 'mpm/lib/mykonos/ad937x_device.cpp')
-rw-r--r-- | mpm/lib/mykonos/ad937x_device.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/mpm/lib/mykonos/ad937x_device.cpp b/mpm/lib/mykonos/ad937x_device.cpp index de3671849..ac7070df4 100644 --- a/mpm/lib/mykonos/ad937x_device.cpp +++ b/mpm/lib/mykonos/ad937x_device.cpp @@ -272,7 +272,20 @@ ad937x_device::ad937x_device( gain_ctrl(gain_pins) { } - +void ad937x_device::update_rx_lo_source(uint8_t rx_lo_source){ + mykonos_config.set_rx_pll_use_external_lo(rx_lo_source); + //TODO: should we re-init after this ? +} +void ad937x_device::update_tx_lo_source(uint8_t tx_lo_source){ + mykonos_config.set_tx_pll_use_external_lo(tx_lo_source); + //TODO: should we re-init after this ? +} +uint8_t ad937x_device::get_rx_lo_source(){ + return mykonos_config.get_rx_pll_use_external_lo(); +} +uint8_t ad937x_device::get_tx_lo_source(){ + return mykonos_config.get_tx_pll_use_external_lo(); +} void ad937x_device::_setup_rf(){ // TODO: add setRfPllLoopFilter here |