From be14725245cca756e19c48d84aedc54064e8706c Mon Sep 17 00:00:00 2001 From: Julian Arnold Date: Thu, 5 Mar 2015 15:25:13 -0800 Subject: b2xx: AGC support --- host/lib/usrp/b200/b200_impl.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'host/lib/usrp/b200') 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(rf_fe_path / "sensors" / "rssi") .publish(boost::bind(&ad9361_ctrl::get_rssi, _codec_ctrl, key)); + + //AGC setup + const std::list mode_strings = boost::assign::list_of("slow")("fast"); + _tree->create(rf_fe_path / "gain" / "agc" / "enable") + .subscribe(boost::bind((&ad9361_ctrl::set_agc), _codec_ctrl, key, _1)) + .set(false); + _tree->create(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 >(rf_fe_path / "gain" / "agc" / "mode" / "options") + .set(mode_strings); } if (key[0] == 'T') { -- cgit v1.2.3