aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/dboard/db_basic_and_lf.cpp8
-rw-r--r--host/lib/usrp/dboard/db_rfx.cpp17
-rw-r--r--host/lib/usrp/dboard/db_xcvr2450.cpp16
3 files changed, 41 insertions, 0 deletions
diff --git a/host/lib/usrp/dboard/db_basic_and_lf.cpp b/host/lib/usrp/dboard/db_basic_and_lf.cpp
index 4ca2ef9b1..fa53bd964 100644
--- a/host/lib/usrp/dboard/db_basic_and_lf.cpp
+++ b/host/lib/usrp/dboard/db_basic_and_lf.cpp
@@ -154,6 +154,10 @@ void basic_rx::rx_get(const wax::obj &key_, wax::obj &val){
val = false;
return;
+ case SUBDEV_PROP_LO_LOCKED:
+ val = true; //there is no LO, so it must be true!
+ return;
+
default: UHD_THROW_PROP_WRITE_ONLY();
}
}
@@ -249,6 +253,10 @@ void basic_tx::tx_get(const wax::obj &key_, wax::obj &val){
val = false;
return;
+ case SUBDEV_PROP_LO_LOCKED:
+ val = true; //there is no LO, so it must be true!
+ return;
+
default: UHD_THROW_PROP_WRITE_ONLY();
}
}
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();
}
}
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();
}
}