From 2595e40b582e963c2bdce2fe61f6ad64504d26c7 Mon Sep 17 00:00:00 2001 From: Mark Meserve Date: Fri, 30 Nov 2018 16:16:36 -0600 Subject: rh: add handling for "all" lo - Adds "all" LO properties. - Adds handling of "all" value in all LO functions. - Re-adds value_error exceptions for illegal settings of LO2, which previously caused issues when the "all" LO was used from multi_usrp. --- .../dboard/rhodium/rhodium_radio_ctrl_init.cpp | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) (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 28e5eb3a6..198691e17 100644 --- a/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_init.cpp +++ b/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_init.cpp @@ -577,6 +577,28 @@ void rhodium_radio_ctrl_impl::_init_frontend_subtree( .add_coerced_subscriber([this,chan_idx](bool enabled){ this->set_rx_lo_export_enabled(enabled, RHODIUM_LO2, chan_idx); }); + //RX ALL LOs + subtree->create(rx_fe_path / "los" / ALL_LOS / "source/value") + .add_coerced_subscriber([this,chan_idx](std::string src) { + this->set_rx_lo_source(src, ALL_LOS, chan_idx); + }) + .set_publisher([this,chan_idx]() { + return this->get_rx_lo_source(ALL_LOS, chan_idx); + }) + ; + subtree->create>(rx_fe_path / "los" / ALL_LOS / "source/options") + .set_publisher([this, chan_idx]() { + return this->get_rx_lo_sources(ALL_LOS, chan_idx); + }) + ; + subtree->create(rx_fe_path / "los" / ALL_LOS / "export") + .add_coerced_subscriber([this,chan_idx](bool enabled){ + this->set_rx_lo_export_enabled(enabled, ALL_LOS, chan_idx); + }) + .set_publisher([this,chan_idx](){ + return this->get_rx_lo_export_enabled(ALL_LOS, chan_idx); + }) + ; //TX LO //TX LO1 Frequency subtree->create(tx_fe_path / "los"/RHODIUM_LO1/"freq/value ") @@ -680,6 +702,28 @@ void rhodium_radio_ctrl_impl::_init_frontend_subtree( this->set_tx_lo_export_enabled(enabled, RHODIUM_LO2, chan_idx); }) ; + //TX ALL LOs + subtree->create(tx_fe_path / "los" / ALL_LOS / "source/value") + .add_coerced_subscriber([this,chan_idx](std::string src) { + this->set_tx_lo_source(src, ALL_LOS, chan_idx); + }) + .set_publisher([this,chan_idx]() { + return this->get_tx_lo_source(ALL_LOS, chan_idx); + }) + ; + subtree->create>(tx_fe_path / "los" / ALL_LOS / "source/options") + .set_publisher([this, chan_idx]() { + return this->get_tx_lo_sources(ALL_LOS, chan_idx); + }) + ; + subtree->create(tx_fe_path / "los" / ALL_LOS / "export") + .add_coerced_subscriber([this,chan_idx](bool enabled){ + this->set_tx_lo_export_enabled(enabled, ALL_LOS, chan_idx); + }) + .set_publisher([this,chan_idx](){ + return this->get_tx_lo_export_enabled(ALL_LOS, chan_idx); + }) + ; //LO Distribution Output Ports if (_lo_dist_present) { -- cgit v1.2.3