summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/common
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-07-06 09:18:47 -0700
committerJosh Blum <josh@joshknows.com>2011-07-06 09:18:47 -0700
commit4389ed48ea22d77e126fe44792c96c2ce508bb7a (patch)
tree52993e6ad529ed8181cd0356cd9a4ad511d807b4 /host/lib/usrp/common
parentdf91040196c536c1cf0a57379b946c89ea73ae6b (diff)
downloaduhd-4389ed48ea22d77e126fe44792c96c2ce508bb7a.tar.gz
uhd-4389ed48ea22d77e126fe44792c96c2ce508bb7a.tar.bz2
uhd-4389ed48ea22d77e126fe44792c96c2ce508bb7a.zip
usrp: enable/disable frontends when validating subdev spec
Diffstat (limited to 'host/lib/usrp/common')
-rw-r--r--host/lib/usrp/common/validate_subdev_spec.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/host/lib/usrp/common/validate_subdev_spec.cpp b/host/lib/usrp/common/validate_subdev_spec.cpp
index 811995bdf..fab40b204 100644
--- a/host/lib/usrp/common/validate_subdev_spec.cpp
+++ b/host/lib/usrp/common/validate_subdev_spec.cpp
@@ -62,4 +62,12 @@ void uhd::usrp::validate_subdev_spec(
BOOST_FOREACH(const subdev_spec_pair_t &pair, spec){
uhd::assert_has(all_specs, pair, str(boost::format("%s subdevice specification on mboard %s") % type % mb));
}
+
+ //enable selected frontends, disable others
+ BOOST_FOREACH(const subdev_spec_pair_t &pair, all_specs){
+ const bool enb = uhd::has(spec, pair);
+ tree->access<bool>(str(boost::format(
+ "/mboards/%s/dboards/%s/%s_frontends/%s/enabled"
+ ) % mb % pair.db_name % type % pair.sd_name)).set(enb);
+ }
}