diff options
author | Trung Tran <trung.tran@ettus.com> | 2017-11-21 15:04:06 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:05:06 -0800 |
commit | 048ad8fe27edd565cc56e6dcf093792689162f23 (patch) | |
tree | f8ed66699240b764a7bd93a3b993e109cbd9f714 /host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.cpp | |
parent | 05e93b66e9fd2df5622b025160b7ae2a2a670442 (diff) | |
download | uhd-048ad8fe27edd565cc56e6dcf093792689162f23.tar.gz uhd-048ad8fe27edd565cc56e6dcf093792689162f23.tar.bz2 uhd-048ad8fe27edd565cc56e6dcf093792689162f23.zip |
mg: ad9371: Add API to toggle LO source
Diffstat (limited to 'host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.cpp')
-rw-r--r-- | host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.cpp b/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.cpp index 2fe31f066..e6ad6ab57 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_ad9371_iface.cpp @@ -111,3 +111,29 @@ double magnesium_ad9371_iface::get_bandwidth(const size_t chan, const direction_ return 0.0; } +std::string magnesium_ad9371_iface::set_lo_source( + const std::string &source, + const uhd::direction_t dir +) { + // There is only one LO for 2 channels. Using channel 0 for 'which' + auto which = _get_which(dir, 0); + UHD_LOG_TRACE(_L, "calling " << _rpc_prefix << "set_lo_source " + << which << "with " << source); + auto retval = _rpcc->request_with_token<std::string>( + _rpc_prefix + "set_lo_source", which, source); + UHD_LOG_TRACE(_L, _rpc_prefix << "set_lo_source returned " << retval); + return retval; +} + +std::string magnesium_ad9371_iface::get_lo_source( + const uhd::direction_t dir +) { + // There is only one LO for 2 channels. Using channel 0 for 'which' + auto which = _get_which(dir,0); + UHD_LOG_TRACE(_L, "calling " << _rpc_prefix << "get_lo_source " << which); + auto retval = _rpcc->request_with_token<std::string>( + _rpc_prefix + "get_lo_source", which); + UHD_LOG_TRACE(_L, _rpc_prefix << "get_lo_source returned " << retval); + return retval; +} + |