aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/db_xcvr2450.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_xcvr2450.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_xcvr2450.cpp')
-rw-r--r--host/lib/usrp/dboard/db_xcvr2450.cpp16
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();
}
}