aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp
diff options
context:
space:
mode:
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.hpp37
1 files changed, 25 insertions, 12 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 75a91d0b4..c8597fdf7 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.hpp
@@ -123,19 +123,29 @@ private:
/**************************************************************************
* Gain Controls (implemented in magnesium_radio_ctrl_gain.cpp)
*************************************************************************/
- double _dsa_set_gain(
- const double gain,
+ //! Set the attenuation of the DSA
+ double _dsa_set_att(
+ const double att,
const size_t chan,
const direction_t dir
);
- double _dsa_get_gain(
+ double _dsa_get_att(
const size_t chan,
const direction_t dir
);
+ //! Write the DSA word
+ void _set_dsa_val(
+ const size_t chan,
+ const direction_t dir,
+ const uint32_t dsa_val
+ );
+
+
double _set_all_gain(
const double gain,
+ const double freq,
const size_t chan,
const direction_t dir
);
@@ -145,22 +155,18 @@ private:
const direction_t dir
);
- void _set_dsa_val(
- const size_t chan,
- const direction_t dir,
- const uint32_t dsa_val
- );
-
/**************************************************************************
* CPLD Controls (implemented in magnesium_radio_ctrl_cpld.cpp)
*************************************************************************/
void _update_rx_freq_switches(
const double freq,
+ const bool bypass_lnas,
const size_t chan
);
void _update_tx_freq_switches(
const double freq,
+ const bool bypass_amps,
const size_t chan
);
@@ -212,15 +218,22 @@ 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;
+
+ //! DSA attenuation
+ double _dsa_rx_att = 0.0;
+ double _dsa_tx_att = 0.0;
+
//! All gain
double _all_rx_gain = 0.0;
double _all_tx_gain = 0.0;
+
+ bool _rx_bypass_lnas = true;
+ bool _tx_bypass_amp = true;
+
//! TRX switch state of 2 channels
std::map<magnesium_cpld_ctrl::chan_sel_t, magnesium_cpld_ctrl::sw_trx_t> _sw_trx = {
{magnesium_cpld_ctrl::CHAN1,