From 80dbdef7305da9028ba3747e79774dbb158a5d55 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 9 Oct 2011 20:28:48 -0700 Subject: b100: add reference lock sensor --- host/lib/usrp/b100/clock_ctrl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'host/lib/usrp/b100/clock_ctrl.cpp') diff --git a/host/lib/usrp/b100/clock_ctrl.cpp b/host/lib/usrp/b100/clock_ctrl.cpp index df1442420..fd398abff 100644 --- a/host/lib/usrp/b100/clock_ctrl.cpp +++ b/host/lib/usrp/b100/clock_ctrl.cpp @@ -428,6 +428,13 @@ public: this->latch_regs(); } + bool get_locked(void){ + static const boost::uint8_t addr = 0x01F; + boost::uint32_t reg = this->read_reg(addr); + _ad9522_regs.set_reg(addr, reg); + return _ad9522_regs.digital_lock_detect != 0; + } + private: i2c_iface::sptr _iface; ad9522_regs_t _ad9522_regs; -- cgit v1.2.3