diff options
-rw-r--r-- | host/lib/usrp/dboard/rhodium/rhodium_radio_control.cpp | 51 | ||||
-rw-r--r-- | host/lib/usrp/dboard/rhodium/rhodium_radio_control.hpp | 12 |
2 files changed, 63 insertions, 0 deletions
diff --git a/host/lib/usrp/dboard/rhodium/rhodium_radio_control.cpp b/host/lib/usrp/dboard/rhodium/rhodium_radio_control.cpp index 5ac0a35cf..5f80b84a1 100644 --- a/host/lib/usrp/dboard/rhodium/rhodium_radio_control.cpp +++ b/host/lib/usrp/dboard/rhodium/rhodium_radio_control.cpp @@ -596,6 +596,57 @@ std::string rhodium_radio_control_impl::get_fe_name( return RHODIUM_FE_NAME; } +/****************************************************************************** + * Calibration Identification API Calls + *****************************************************************************/ +void rhodium_radio_control_impl::set_tx_dc_offset( + const std::complex<double>& offset, size_t) +{ + _tx_fe_core->set_dc_offset(offset); +} + +meta_range_t rhodium_radio_control_impl::get_tx_dc_offset_range(size_t) const +{ + return get_tree() + ->access<meta_range_t>(FE_PATH / "tx_fe_corrections" / 0 / "dc_offset/range") + .get(); +} + +void rhodium_radio_control_impl::set_tx_iq_balance( + const std::complex<double>& correction, size_t) +{ + _tx_fe_core->set_iq_balance(correction); +} + +void rhodium_radio_control_impl::set_rx_dc_offset(const bool enb, size_t) +{ + _rx_fe_core->set_dc_offset(enb); +} + +void rhodium_radio_control_impl::set_rx_dc_offset( + const std::complex<double>& offset, size_t) +{ + _rx_fe_core->set_dc_offset(offset); +} + +meta_range_t rhodium_radio_control_impl::get_rx_dc_offset_range(size_t) const +{ + return get_tree() + ->access<meta_range_t>(FE_PATH / "rx_fe_corrections" / 0 / "dc_offset/range") + .get(); +} + +void rhodium_radio_control_impl::set_rx_iq_balance(const bool enb, size_t) +{ + _rx_fe_core->set_iq_balance(enb); +} + +void rhodium_radio_control_impl::set_rx_iq_balance( + const std::complex<double>& correction, size_t) +{ + _rx_fe_core->set_iq_balance(correction); +} + /************************************************************************** * GPIO Controls *************************************************************************/ diff --git a/host/lib/usrp/dboard/rhodium/rhodium_radio_control.hpp b/host/lib/usrp/dboard/rhodium/rhodium_radio_control.hpp index 696f81c85..a99289f21 100644 --- a/host/lib/usrp/dboard/rhodium/rhodium_radio_control.hpp +++ b/host/lib/usrp/dboard/rhodium/rhodium_radio_control.hpp @@ -161,6 +161,18 @@ public: std::string get_fe_name( const size_t chan, const uhd::direction_t direction) const override; + /************************************************************************** + * Calibration API Calls + *************************************************************************/ + void set_tx_dc_offset(const std::complex<double>& offset, size_t chan) override; + meta_range_t get_tx_dc_offset_range(size_t chan) const override; + void set_tx_iq_balance(const std::complex<double>& correction, size_t chan) override; + void set_rx_dc_offset(const bool enb, size_t chan = ALL_CHANS) override; + void set_rx_dc_offset(const std::complex<double>& offset, size_t chan) override; + meta_range_t get_rx_dc_offset_range(size_t chan) const override; + void set_rx_iq_balance(const bool enb, size_t chan) override; + void set_rx_iq_balance(const std::complex<double>& correction, size_t chan) override; + /************************************************************************ * ??? calls ***********************************************************************/ |