From 688247e5451216e82c3817e75d0c2bcfb70488c9 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 21 Nov 2017 16:52:20 -0800 Subject: mpm: ad937x: Add LO lock API Reviewed-By: Steven Bingler Reviewed-By: Trung Tran --- mpm/lib/mykonos/ad937x_ctrl.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mpm/lib') 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 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 & fir) { auto dir = _get_direction_from_antenna(which); -- cgit v1.2.3