aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/e100/clock_ctrl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-09-27 13:24:17 -0700
committerJosh Blum <josh@joshknows.com>2011-09-28 09:27:44 -0700
commitc2122833e25ffe6e8e6918874afe7a3c9a92bc87 (patch)
tree1821988d70d283a313a802718c1a5aa6ed5ce5cf /host/lib/usrp/e100/clock_ctrl.cpp
parent7d705122445aa27597de8a863051a7844014664b (diff)
downloaduhd-c2122833e25ffe6e8e6918874afe7a3c9a92bc87.tar.gz
uhd-c2122833e25ffe6e8e6918874afe7a3c9a92bc87.tar.bz2
uhd-c2122833e25ffe6e8e6918874afe7a3c9a92bc87.zip
e100: added ref locked sensor for clock reference
Diffstat (limited to 'host/lib/usrp/e100/clock_ctrl.cpp')
-rw-r--r--host/lib/usrp/e100/clock_ctrl.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/host/lib/usrp/e100/clock_ctrl.cpp b/host/lib/usrp/e100/clock_ctrl.cpp
index 0eb9eef8e..1dd55049b 100644
--- a/host/lib/usrp/e100/clock_ctrl.cpp
+++ b/host/lib/usrp/e100/clock_ctrl.cpp
@@ -432,6 +432,16 @@ public:
this->latch_regs();
}
+ bool get_locked(void){
+ static const boost::uint8_t addr = 0x01F;
+ boost::uint32_t reg = _iface->read_spi(
+ UE_SPI_SS_AD9522, spi_config_t::EDGE_RISE,
+ _ad9522_regs.get_read_reg(addr), 24
+ );
+ _ad9522_regs.set_reg(addr, reg);
+ return _ad9522_regs.digital_lock_detect != 0;
+ }
+
private:
spi_iface::sptr _iface;
const bool _dboard_clocks_diff;