aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp
diff options
context:
space:
mode:
authorTrung N Tran <trung.n.tran@ni.com>2017-10-25 01:10:06 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:04:03 -0800
commit458655be730602ae3d0b2f4202f6aa334dd38f23 (patch)
tree0f13be962ca5f0d796c87ab0bb0c25d5deed610d /host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp
parent3611033e9b52a19ca8d11b8a56a075096bcfb1a4 (diff)
downloaduhd-458655be730602ae3d0b2f4202f6aa334dd38f23.tar.gz
uhd-458655be730602ae3d0b2f4202f6aa334dd38f23.tar.bz2
uhd-458655be730602ae3d0b2f4202f6aa334dd38f23.zip
mg: Add DSA, AD9371, and total gain
- Adds gains to gain group: dsa, ad9371 - Defaults to splitting gains evenly across group members - Adds gain_mode which allows automatic gain setting, or manually setting DSA vs. AD9371
Diffstat (limited to 'host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp')
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp38
1 files changed, 35 insertions, 3 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp
index e0031c611..7cebc168d 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp
@@ -143,18 +143,41 @@ private:
const double freq,
const size_t chan
);
-
- void _update_freq_switches(
+ void _update_freq_switches(
const double freq,
const size_t chan,
const direction_t dir
);
void _update_atr_switches(
- const size_t chan,
+ const magnesium_cpld_ctrl::chan_sel_t chan,
const direction_t dir,
const std::string &ant
);
+
+ double _dsa_set_gain(
+ const double gain,
+ const size_t chan,
+ const direction_t dir
+ );
+ double _dsa_get_gain(
+ const size_t chan,
+ const direction_t dir
+ );
+ double _set_all_gain(
+ const double gain,
+ const size_t chan,
+ const direction_t dir
+ );
+ double _get_all_gain(
+ const size_t chan,
+ const direction_t dir
+ );
+ void _set_dsa_val(
+ const size_t chan,
+ const direction_t dir,
+ const uint32_t dsa_val
+ );
//! Letter representation of the radio we're currently running
std::string _radio_slot;
@@ -190,6 +213,15 @@ private:
//! Front panel GPIO controller. Note that only one radio block per
// module can be the FP-GPIO master.
usrp::gpio_atr::gpio_atr_3000::sptr _fp_gpio;
+ //! AD9371 gain
+ double _ad9371_rx_gain = 0.0;
+ double _ad9371_tx_gain = 0.0;
+ //! DSA gain
+ double _dsa_rx_gain = 0.0;
+ double _dsa_tx_gain = 0.0;
+ //! All gain
+ double _all_rx_gain = 0.0;
+ double _all_tx_gain = 0.0;
}; /* class radio_ctrl_impl */