From 9b9da62e800ed88123c3bae7abecd5603ead0f7e Mon Sep 17 00:00:00 2001 From: Mark Meserve Date: Fri, 21 Dec 2018 15:54:17 -0600 Subject: rh: implement set_rate --- host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_init.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_init.cpp') 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("rx_codecs" / _radio_slot / "name").set("ad9695-625"); _tree->create("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("tick_rate") .set_publisher([this](){ return this->get_rate(); }) + .add_coerced_subscriber([this](double rate) { return this->set_rate(rate); }) ; } } -- cgit v1.2.3