diff options
author | Josh Blum <josh@joshknows.com> | 2011-10-09 20:28:48 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-10-10 17:42:26 -0700 |
commit | 80dbdef7305da9028ba3747e79774dbb158a5d55 (patch) | |
tree | 75d8bad7d823d79aa167e92e49251b399e7d3530 /host/lib/usrp/b100/clock_ctrl.cpp | |
parent | a2c19e5a54ac410b588dd4fc0445071475d56ef9 (diff) | |
download | uhd-80dbdef7305da9028ba3747e79774dbb158a5d55.tar.gz uhd-80dbdef7305da9028ba3747e79774dbb158a5d55.tar.bz2 uhd-80dbdef7305da9028ba3747e79774dbb158a5d55.zip |
b100: add reference lock sensor
Diffstat (limited to 'host/lib/usrp/b100/clock_ctrl.cpp')
-rw-r--r-- | host/lib/usrp/b100/clock_ctrl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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; |