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/b100_impl.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/b100_impl.cpp')
-rw-r--r-- | host/lib/usrp/b100/b100_impl.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp index 5e36a19dd..591a8b49f 100644 --- a/host/lib/usrp/b100/b100_impl.cpp +++ b/host/lib/usrp/b100/b100_impl.cpp @@ -275,8 +275,8 @@ b100_impl::b100_impl(const device_addr_t &device_addr){ //////////////////////////////////////////////////////////////////// // and do the misc mboard sensors //////////////////////////////////////////////////////////////////// - //none for now... - _tree->create<int>(mb_path / "sensors"); //phony property so this dir exists + _tree->create<sensor_value_t>(mb_path / "sensors/ref_locked") + .publish(boost::bind(&b100_impl::get_ref_locked, this)); //////////////////////////////////////////////////////////////////// // create frontend control objects @@ -491,3 +491,8 @@ void b100_impl::enable_gpif(const bool en) { void b100_impl::clear_fpga_fifo(void) { _fx2_ctrl->usrp_control_write(VRQ_CLEAR_FPGA_FIFO, 0, 0, 0, 0); } + +sensor_value_t b100_impl::get_ref_locked(void){ + const bool lock = _clock_ctrl->get_locked(); + return sensor_value_t("Ref", lock, "locked", "unlocked"); +} |