aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/db_rfx.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-04-26 15:13:29 -0700
committerJosh Blum <josh@joshknows.com>2010-04-26 15:13:29 -0700
commitb1992806e130216fdab963c2154f489189b8c3b5 (patch)
tree772d5d53f61758422d7eeb6870f242285db81c15 /host/lib/usrp/dboard/db_rfx.cpp
parent90ed2e3a80eef0be3a7270364335f0e82f004cc1 (diff)
downloaduhd-b1992806e130216fdab963c2154f489189b8c3b5.tar.gz
uhd-b1992806e130216fdab963c2154f489189b8c3b5.tar.bz2
uhd-b1992806e130216fdab963c2154f489189b8c3b5.zip
added lock detect status to dboards
Diffstat (limited to 'host/lib/usrp/dboard/db_rfx.cpp')
-rw-r--r--host/lib/usrp/dboard/db_rfx.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp
index 14879dbed..6ad5ad906 100644
--- a/host/lib/usrp/dboard/db_rfx.cpp
+++ b/host/lib/usrp/dboard/db_rfx.cpp
@@ -94,6 +94,15 @@ private:
* \return the actual frequency in Hz
*/
double set_lo_freq(dboard_iface::unit_t unit, double target_freq);
+
+ /*!
+ * Get the lock detect status of the LO.
+ * \param unit which unit rx or tx
+ * \return true for locked
+ */
+ bool get_locked(dboard_iface::unit_t unit){
+ return (this->get_iface()->read_gpio(unit) & LOCKDET_MASK) != 0;
+ }
};
/***********************************************************************
@@ -397,6 +406,10 @@ void rfx_xcvr::rx_get(const wax::obj &key_, wax::obj &val){
val = false;
return;
+ case SUBDEV_PROP_LO_LOCKED:
+ val = this->get_locked(dboard_iface::UNIT_RX);
+ return;
+
default: UHD_THROW_PROP_WRITE_ONLY();
}
}
@@ -486,6 +499,10 @@ void rfx_xcvr::tx_get(const wax::obj &key_, wax::obj &val){
val = true;
return;
+ case SUBDEV_PROP_LO_LOCKED:
+ val = this->get_locked(dboard_iface::UNIT_TX);
+ return;
+
default: UHD_THROW_PROP_WRITE_ONLY();
}
}