diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-01-30 14:41:00 +0100 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-02-15 17:34:10 -0800 |
commit | a56185c6f51815357c736fe35c5fc372865a7c65 (patch) | |
tree | e6aa78ab1ebafa940bbd2f933d1dae8358dd6d29 /host/lib/usrp/x300/x300_radio_ctrl_impl.hpp | |
parent | f37a9ae717a0de2284bcf6d0efea87875ea5a624 (diff) | |
download | uhd-a56185c6f51815357c736fe35c5fc372865a7c65.tar.gz uhd-a56185c6f51815357c736fe35c5fc372865a7c65.tar.bz2 uhd-a56185c6f51815357c736fe35c5fc372865a7c65.zip |
x300: Enable ADC gain through RFNoC API
The RFNoC call set_rx_gain() would previously ignore the additional 6 dB
that can be set on the ADC. On the BasicRX board in particular, this
meant there was no RX gain setting at all.
Diffstat (limited to 'host/lib/usrp/x300/x300_radio_ctrl_impl.hpp')
-rw-r--r-- | host/lib/usrp/x300/x300_radio_ctrl_impl.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp index 7cc0ea18d..63aac876d 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp @@ -15,10 +15,12 @@ #include <uhd/usrp/dboard_eeprom.hpp> #include <uhd/usrp/dboard_manager.hpp> #include <uhd/usrp/gpio_defs.hpp> +#include <uhd/utils/gain_group.hpp> #include <uhdlib/rfnoc/radio_ctrl_impl.hpp> #include <uhdlib/usrp/cores/rx_frontend_core_3000.hpp> #include <uhdlib/usrp/cores/spi_core_3000.hpp> #include <uhdlib/usrp/cores/tx_frontend_core_200.hpp> +#include <unordered_map> namespace uhd { namespace rfnoc { @@ -54,6 +56,7 @@ public: double set_tx_gain(const double gain, const size_t chan); double set_rx_gain(const double gain, const size_t chan); + double get_rx_gain(const size_t chan); std::vector<std::string> get_rx_lo_names(const size_t chan); std::vector<std::string> get_rx_lo_sources( @@ -234,6 +237,8 @@ private: // members bool _ignore_cal_file; + std::unordered_map<size_t, uhd::gain_group::sptr> _tx_gain_groups; + std::unordered_map<size_t, uhd::gain_group::sptr> _rx_gain_groups; }; /* class radio_ctrl_impl */ }} /* namespace uhd::rfnoc */ |