diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-01-30 14:41:00 +0100 |
---|---|---|
committer | michael-west <michael.west@ettus.com> | 2019-02-18 11:03:09 -0800 |
commit | 85ec2704384c09da8913f58f94b6a3ee6a007ba5 (patch) | |
tree | 8e0db689f61764ac5b6371dfb14e8a84a01eeb33 /host/lib/usrp/x300/x300_radio_ctrl_impl.hpp | |
parent | b81b4aaeaf3187ffcc69513f83ef9651b8e27b18 (diff) | |
download | uhd-85ec2704384c09da8913f58f94b6a3ee6a007ba5.tar.gz uhd-85ec2704384c09da8913f58f94b6a3ee6a007ba5.tar.bz2 uhd-85ec2704384c09da8913f58f94b6a3ee6a007ba5.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 */ |