diff options
author | Julian Arnold <julian.arnold@ettus.com> | 2015-03-05 15:25:13 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-03-05 17:18:53 -0800 |
commit | be14725245cca756e19c48d84aedc54064e8706c (patch) | |
tree | 8d366a8ad3ab05a87f05f714c215866907cf23b6 /host/lib/usrp/b200 | |
parent | 99ab759233c85de000d16ad0f10660819e9456f1 (diff) | |
download | uhd-be14725245cca756e19c48d84aedc54064e8706c.tar.gz uhd-be14725245cca756e19c48d84aedc54064e8706c.tar.bz2 uhd-be14725245cca756e19c48d84aedc54064e8706c.zip |
b2xx: AGC support
Diffstat (limited to 'host/lib/usrp/b200')
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index ada25ad59..663696926 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -734,6 +734,16 @@ void b200_impl::setup_radio(const size_t dspno) .set("RX2"); _tree->create<sensor_value_t>(rf_fe_path / "sensors" / "rssi") .publish(boost::bind(&ad9361_ctrl::get_rssi, _codec_ctrl, key)); + + //AGC setup + const std::list<std::string> mode_strings = boost::assign::list_of("slow")("fast"); + _tree->create<bool>(rf_fe_path / "gain" / "agc" / "enable") + .subscribe(boost::bind((&ad9361_ctrl::set_agc), _codec_ctrl, key, _1)) + .set(false); + _tree->create<std::string>(rf_fe_path / "gain" / "agc" / "mode" / "value") + .subscribe(boost::bind((&ad9361_ctrl::set_agc_mode), _codec_ctrl, key, _1)).set(mode_strings.front()); + _tree->create<std::list<std::string> >(rf_fe_path / "gain" / "agc" / "mode" / "options") + .set(mode_strings); } if (key[0] == 'T') { |