diff options
author | Josh Blum <josh@joshknows.com> | 2010-04-26 15:13:29 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-04-26 15:13:29 -0700 |
commit | b1992806e130216fdab963c2154f489189b8c3b5 (patch) | |
tree | 772d5d53f61758422d7eeb6870f242285db81c15 /host/lib/usrp/dboard/db_xcvr2450.cpp | |
parent | 90ed2e3a80eef0be3a7270364335f0e82f004cc1 (diff) | |
download | uhd-b1992806e130216fdab963c2154f489189b8c3b5.tar.gz uhd-b1992806e130216fdab963c2154f489189b8c3b5.tar.bz2 uhd-b1992806e130216fdab963c2154f489189b8c3b5.zip |
added lock detect status to dboards
Diffstat (limited to 'host/lib/usrp/dboard/db_xcvr2450.cpp')
-rw-r--r-- | host/lib/usrp/dboard/db_xcvr2450.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp index 576d08848..5b932904d 100644 --- a/host/lib/usrp/dboard/db_xcvr2450.cpp +++ b/host/lib/usrp/dboard/db_xcvr2450.cpp @@ -126,6 +126,14 @@ private: } static bool is_highband(double freq){return freq > 3e9;} + + /*! + * Is the LO locked? + * \return true for locked + */ + bool get_locked(void){ + return (this->get_iface()->read_gpio(dboard_iface::UNIT_RX) & LOCKDET_RXIO) != 0; + } }; /*********************************************************************** @@ -476,6 +484,10 @@ void xcvr2450::rx_get(const wax::obj &key_, wax::obj &val){ val = false; return; + case SUBDEV_PROP_LO_LOCKED: + val = this->get_locked(); + return; + default: UHD_THROW_PROP_WRITE_ONLY(); } } @@ -566,6 +578,10 @@ void xcvr2450::tx_get(const wax::obj &key_, wax::obj &val){ val = false; return; + case SUBDEV_PROP_LO_LOCKED: + val = this->get_locked(); + return; + default: UHD_THROW_PROP_WRITE_ONLY(); } } |