aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/mboard_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-08-05 16:41:51 -0700
committerJosh Blum <josh@joshknows.com>2010-08-06 12:15:05 -0700
commit5ec42578fa9f69e92ae935c16717957a6ea66324 (patch)
treedb54b506b9dccb857723b7b07ce236986e070e8b /host/lib/usrp/usrp2/mboard_impl.cpp
parenta333a01ac0d1d0cb011d52f04bed2534a708f944 (diff)
downloaduhd-5ec42578fa9f69e92ae935c16717957a6ea66324.tar.gz
uhd-5ec42578fa9f69e92ae935c16717957a6ea66324.tar.bz2
uhd-5ec42578fa9f69e92ae935c16717957a6ea66324.zip
uhd: created subdevice pair struct for subdev spec (easier than first/second)
Diffstat (limited to 'host/lib/usrp/usrp2/mboard_impl.cpp')
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index c35171fec..a2a63edf3 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -323,16 +323,16 @@ void usrp2_mboard_impl::set(const wax::obj &key, const wax::obj &val){
_rx_subdev_spec = val.as<subdev_spec_t>();
//handle automatic
if (_rx_subdev_spec.empty()) _rx_subdev_spec.push_back(
- subdev_spec_t::pair_t("", _dboard_manager->get_rx_subdev_names().front())
+ subdev_spec_pair_t("", _dboard_manager->get_rx_subdev_names().front())
);
std::cout << "RX " << _rx_subdev_spec.to_pp_string() << std::endl;
//sanity check
UHD_ASSERT_THROW(_rx_subdev_spec.size() == 1);
- uhd::assert_has((*this)[MBOARD_PROP_RX_DBOARD_NAMES].as<prop_names_t>(), _rx_subdev_spec.front().first, "rx dboard names");
- uhd::assert_has(_dboard_manager->get_rx_subdev_names(), _rx_subdev_spec.front().second, "rx subdev names");
+ uhd::assert_has((*this)[MBOARD_PROP_RX_DBOARD_NAMES].as<prop_names_t>(), _rx_subdev_spec.front().db_name, "rx dboard names");
+ uhd::assert_has(_dboard_manager->get_rx_subdev_names(), _rx_subdev_spec.front().sd_name, "rx subdev names");
//set the mux
_iface->poke32(U2_REG_DSP_RX_MUX, dsp_type1::calc_rx_mux_word(
- _dboard_manager->get_rx_subdev(_rx_subdev_spec.front().second)[SUBDEV_PROP_CONNECTION].as<subdev_conn_t>()
+ _dboard_manager->get_rx_subdev(_rx_subdev_spec.front().sd_name)[SUBDEV_PROP_CONNECTION].as<subdev_conn_t>()
));
return;
@@ -340,16 +340,16 @@ void usrp2_mboard_impl::set(const wax::obj &key, const wax::obj &val){
_tx_subdev_spec = val.as<subdev_spec_t>();
//handle automatic
if (_tx_subdev_spec.empty()) _tx_subdev_spec.push_back(
- subdev_spec_t::pair_t("", _dboard_manager->get_tx_subdev_names().front())
+ subdev_spec_pair_t("", _dboard_manager->get_tx_subdev_names().front())
);
std::cout << "TX " << _tx_subdev_spec.to_pp_string() << std::endl;
//sanity check
UHD_ASSERT_THROW(_tx_subdev_spec.size() == 1);
- uhd::assert_has((*this)[MBOARD_PROP_TX_DBOARD_NAMES].as<prop_names_t>(), _tx_subdev_spec.front().first, "tx dboard names");
- uhd::assert_has(_dboard_manager->get_tx_subdev_names(), _tx_subdev_spec.front().second, "tx subdev names");
+ uhd::assert_has((*this)[MBOARD_PROP_TX_DBOARD_NAMES].as<prop_names_t>(), _tx_subdev_spec.front().db_name, "tx dboard names");
+ uhd::assert_has(_dboard_manager->get_tx_subdev_names(), _tx_subdev_spec.front().sd_name, "tx subdev names");
//set the mux
_iface->poke32(U2_REG_DSP_TX_MUX, dsp_type1::calc_tx_mux_word(
- _dboard_manager->get_tx_subdev(_tx_subdev_spec.front().second)[SUBDEV_PROP_CONNECTION].as<subdev_conn_t>()
+ _dboard_manager->get_tx_subdev(_tx_subdev_spec.front().sd_name)[SUBDEV_PROP_CONNECTION].as<subdev_conn_t>()
));
return;