diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-11-21 16:52:20 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:05:07 -0800 |
commit | 688247e5451216e82c3817e75d0c2bcfb70488c9 (patch) | |
tree | 447396892013a6cd5c1dec8591e2ebf7b569a614 /mpm/lib/mykonos | |
parent | 67010257063f24052ee130e01b8f64ac0daa5a7e (diff) | |
download | uhd-688247e5451216e82c3817e75d0c2bcfb70488c9.tar.gz uhd-688247e5451216e82c3817e75d0c2bcfb70488c9.tar.bz2 uhd-688247e5451216e82c3817e75d0c2bcfb70488c9.zip |
mpm: ad937x: Add LO lock API
Reviewed-By: Steven Bingler <steven.bingler@ni.com>
Reviewed-By: Trung Tran <trung.tran@ettus.com>
Diffstat (limited to 'mpm/lib/mykonos')
-rw-r--r-- | mpm/lib/mykonos/ad937x_ctrl.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mpm/lib/mykonos/ad937x_ctrl.cpp b/mpm/lib/mykonos/ad937x_ctrl.cpp index 2594ac920..8aeb5b599 100644 --- a/mpm/lib/mykonos/ad937x_ctrl.cpp +++ b/mpm/lib/mykonos/ad937x_ctrl.cpp @@ -417,6 +417,17 @@ public: return device.get_freq(dir); } + virtual bool get_lo_locked(const std::string &which) + { + const auto dir = _get_direction_from_antenna(which); + const uint8_t pll_select = (dir == uhd::RX_DIRECTION) ? + ad937x_device::RX_SYNTH : + ad937x_device::TX_SYNTH; + + std::lock_guard<std::mutex> lock(*spi_mutex); + return device.get_pll_lock_status(pll_select); + } + virtual void set_fir(const std::string &which, int8_t gain, const std::vector<int16_t> & fir) { auto dir = _get_direction_from_antenna(which); |