diff options
author | Thomas Vogel <thomas.vogel@ni.com> | 2019-07-01 17:12:08 +0200 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-07-24 11:16:37 -0700 |
commit | e76988c579e5e154416d94c27be89bd5f6dc56fa (patch) | |
tree | fb4b9fc6ca91c8a3778b296b2890e3dd08e5252d /host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp | |
parent | 8b294082d4804198c45b0acb1ad6393e4f6ef0da (diff) | |
download | uhd-e76988c579e5e154416d94c27be89bd5f6dc56fa.tar.gz uhd-e76988c579e5e154416d94c27be89bd5f6dc56fa.tar.bz2 uhd-e76988c579e5e154416d94c27be89bd5f6dc56fa.zip |
n310: add capability to control RF filter bypass and freq.band limits
With the keywords "rx_gain_profile", "tx_gain_profile" and the new
values "default_bypass_always_off" and "default_bypass_always_on" the
customer can control whether the filter bypass shall be applied as
defined in the gain-table or whether to switch the bypass to ON or OFF
for all gains.
With the keywords "rx_band_map" and "tx_band_map" the user can define
custom frequency borders for the band mapping.
These new keywords can be used in the uhd.con, e.g.:
[type=n3xx]
rx_gain_profile=default_bypass_always_off
tx_gain_profile=default_bypass_always_on
rx_band_map=431e6;601e6;1051e6;1601e6;2101e6;2701e6
tx_band_map=723.18e6;1623.18e6;3323.18e6
Diffstat (limited to 'host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp')
-rw-r--r-- | host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp index 422b07ebb..89db61428 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_init.cpp @@ -28,7 +28,10 @@ constexpr char MAGNESIUM_DEFAULT_RX_ANTENNA[] = "RX2"; constexpr char MAGNESIUM_DEFAULT_TX_ANTENNA[] = "TX/RX"; //! Magnesium gain profile options -const std::vector<std::string> MAGNESIUM_GP_OPTIONS = {"manual", "default"}; +const std::vector<std::string> MAGNESIUM_GP_OPTIONS = {"manual", + "default", + "default_rf_filter_bypass_always_on", + "default_rf_filter_bypass_always_off"}; } // namespace //! Helper function to extract single value of port number. @@ -261,10 +264,11 @@ void magnesium_radio_ctrl_impl::_init_frontend_subtree( }); subtree->create<std::vector<std::string>>(tx_fe_path / "gains/all/profile/options") - .set({"manual", "default"}); + .set(MAGNESIUM_GP_OPTIONS); subtree->create<std::string>(tx_fe_path / "gains/all/profile/value") .set_coercer([this](const std::string& profile) { + // check if given profile is valid, otherwise use default profile std::string return_profile = profile; if (std::find( MAGNESIUM_GP_OPTIONS.begin(), MAGNESIUM_GP_OPTIONS.end(), profile) @@ -300,6 +304,7 @@ void magnesium_radio_ctrl_impl::_init_frontend_subtree( subtree->create<std::string>(rx_fe_path / "gains/all/profile/value") .set_coercer([this](const std::string& profile) { + // check if given profile is valid, otherwise use default profile std::string return_profile = profile; if (std::find( MAGNESIUM_GP_OPTIONS.begin(), MAGNESIUM_GP_OPTIONS.end(), profile) |