aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_init.cpp
diff options
context:
space:
mode:
authorMark Meserve <mark.meserve@ni.com>2018-12-21 15:54:17 -0600
committerBrent Stapleton <brent.stapleton@ettus.com>2019-01-10 09:50:16 -0800
commit9b9da62e800ed88123c3bae7abecd5603ead0f7e (patch)
tree1ac936dedc38f51c539c3e421136aee886b0a130 /host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_init.cpp
parentec0b4dd1274c2d1d3fd392561f90e0186732cd52 (diff)
downloaduhd-9b9da62e800ed88123c3bae7abecd5603ead0f7e.tar.gz
uhd-9b9da62e800ed88123c3bae7abecd5603ead0f7e.tar.bz2
uhd-9b9da62e800ed88123c3bae7abecd5603ead0f7e.zip
rh: implement set_rate
Diffstat (limited to 'host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_init.cpp')
-rw-r--r--host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_init.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_init.cpp b/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_init.cpp
index 9cf7c57e6..b626e5c15 100644
--- a/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_init.cpp
+++ b/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_init.cpp
@@ -794,11 +794,15 @@ void rhodium_radio_ctrl_impl::_init_prop_tree()
_tree->create<std::string>("rx_codecs" / _radio_slot / "name").set("ad9695-625");
_tree->create<std::string>("tx_codecs" / _radio_slot / "name").set("dac37j82");
- // TODO remove this dirty hack
- if (not _tree->exists("tick_rate"))
+ // The tick_rate is equivalent to the master clock rate of the DB in slot A
+ if (_radio_slot == "A")
{
+ UHD_ASSERT_THROW(!_tree->exists("tick_rate"));
+ // set_rate sets the clock rate of the entire device, not just this DB,
+ // so only add DB A's set and get functions to the tree.
_tree->create<double>("tick_rate")
.set_publisher([this](){ return this->get_rate(); })
+ .add_coerced_subscriber([this](double rate) { return this->set_rate(rate); })
;
}
}