aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-07-30 10:11:49 -0700
committerJosh Blum <josh@joshknows.com>2011-11-07 11:20:04 -0800
commitd9035414a27f484b89816e6e99c7f14d1769dee0 (patch)
tree2b6993265ae21e939b22734293dd519d0ed6a879 /host/lib/usrp/usrp1
parentf3afd2eb94a65b4e6494c269ff67cd283dcad1de (diff)
downloaduhd-d9035414a27f484b89816e6e99c7f14d1769dee0.tar.gz
uhd-d9035414a27f484b89816e6e99c7f14d1769dee0.tar.bz2
uhd-d9035414a27f484b89816e6e99c7f14d1769dee0.zip
usrp: work on dboard code to use subtrees to populate frontend props
Diffstat (limited to 'host/lib/usrp/usrp1')
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp21
1 files changed, 4 insertions, 17 deletions
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index 6634b43da..4be5a3a2b 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -363,29 +363,16 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){
);
_tree->create<dboard_iface::sptr>(mb_path / "dboards" / db/ "iface").set(_dbc[db].dboard_iface);
_dbc[db].dboard_manager = dboard_manager::make(
- rx_db_eeprom.id,
- ((gdb_eeprom.id == dboard_id_t::none())? tx_db_eeprom : gdb_eeprom).id,
- _dbc[db].dboard_iface
+ rx_db_eeprom.id, tx_db_eeprom.id, gdb_eeprom.id,
+ _dbc[db].dboard_iface, _tree->subtree(mb_path / "dboards" / db)
);
- BOOST_FOREACH(const std::string &name, _dbc[db].dboard_manager->get_rx_subdev_names()){
- dboard_manager::populate_prop_tree_from_subdev(
- _tree->subtree(mb_path / "dboards" / db/ "rx_frontends" / name),
- _dbc[db].dboard_manager->get_rx_subdev(name)
- );
- }
- BOOST_FOREACH(const std::string &name, _dbc[db].dboard_manager->get_tx_subdev_names()){
- dboard_manager::populate_prop_tree_from_subdev(
- _tree->subtree(mb_path / "dboards" / db/ "tx_frontends" / name),
- _dbc[db].dboard_manager->get_tx_subdev(name)
- );
- }
//init the subdev specs if we have a dboard (wont leave this loop empty)
if (rx_db_eeprom.id != dboard_id_t::none() or _rx_subdev_spec.empty()){
- _rx_subdev_spec = subdev_spec_t(db + ":" + _dbc[db].dboard_manager->get_rx_subdev_names()[0]);
+ _rx_subdev_spec = subdev_spec_t(db + ":" + _tree->list(mb_path / "dboards" / db / "rx_frontends").at(0));
}
if (tx_db_eeprom.id != dboard_id_t::none() or _tx_subdev_spec.empty()){
- _tx_subdev_spec = subdev_spec_t(db + ":" + _dbc[db].dboard_manager->get_tx_subdev_names()[0]);
+ _tx_subdev_spec = subdev_spec_t(db + ":" + _tree->list(mb_path / "dboards" / db / "tx_frontends").at(0));
}
}