diff options
author | Mark Meserve <mark.meserve@ni.com> | 2018-10-02 14:26:49 -0500 |
---|---|---|
committer | Brent Stapleton <bstapleton@g.hmc.edu> | 2018-11-05 13:43:07 -0800 |
commit | 728d9abfe7fd9adf87ba4f87627829e09ddcc8cf (patch) | |
tree | 757accf69ea77d5f04ce147c0188be20b742a9f0 /host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_init.cpp | |
parent | 44eb4b4b43a58324854ce50ef983331c98125eeb (diff) | |
download | uhd-728d9abfe7fd9adf87ba4f87627829e09ddcc8cf.tar.gz uhd-728d9abfe7fd9adf87ba4f87627829e09ddcc8cf.tar.bz2 uhd-728d9abfe7fd9adf87ba4f87627829e09ddcc8cf.zip |
rh: add lo distribution support
- This is a combination of 5 commits.
- rh: add lo distribution board gpio expander
- rh: add lo distribution mpm functions
- rh: add code to conditionally initialize lo distribution
- rh: change empty i2c device from exception to assertion
- rh: add lo distribution board control
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.cpp | 26 |
1 files changed, 26 insertions, 0 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 8c2e6f231..6f7e37c26 100644 --- a/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_init.cpp +++ b/host/lib/usrp/dboard/rhodium/rhodium_radio_ctrl_init.cpp @@ -213,6 +213,10 @@ void rhodium_radio_ctrl_impl::_init_peripherals() _tx_fe_core->set_dc_offset(tx_frontend_core_200::DEFAULT_DC_OFFSET_VALUE); _tx_fe_core->set_iq_balance(tx_frontend_core_200::DEFAULT_IQ_BALANCE_VALUE); _tx_fe_core->populate_subtree(_tree->subtree(_root_path / "tx_fe_corrections" / 0)); + + UHD_LOG_TRACE(unique_id(), "Checking for existence of LO Distribution board"); + _lo_dist_present = _rpcc->request_with_token<bool>(_rpc_prefix + "is_lo_dist_present"); + UHD_LOG_DEBUG(unique_id(), str(boost::format("LO distribution board is%s present") % (_lo_dist_present ? "" : " NOT"))); } void rhodium_radio_ctrl_impl::_init_frontend_subtree( @@ -661,6 +665,28 @@ void rhodium_radio_ctrl_impl::_init_frontend_subtree( this->set_tx_lo_export_enabled(enabled, RHODIUM_LO2, chan_idx); }) ; + + //LO Distribution Output Ports + if (_lo_dist_present) { + for (const auto& port : LO_OUTPUT_PORT_NAMES) { + subtree->create<bool>(tx_fe_path / "los" / RHODIUM_LO1 / "lo_distribution" / port / "export") + .add_coerced_subscriber([this, chan_idx, port](bool enabled) { + this->set_tx_lo_output_enabled(enabled, port, chan_idx); + }) + .set_publisher([this, chan_idx, port]() { + return this->get_tx_lo_output_enabled(port, chan_idx); + }) + ; + subtree->create<bool>(rx_fe_path / "los" / RHODIUM_LO1 / "lo_distribution" / port / "export") + .add_coerced_subscriber([this, chan_idx, port](bool enabled) { + this->set_tx_lo_output_enabled(enabled, port, chan_idx); + }) + .set_publisher([this, chan_idx, port]() { + return this->get_tx_lo_output_enabled(port, chan_idx); + }) + ; + } + } } void rhodium_radio_ctrl_impl::_init_prop_tree() |