From 5ec42578fa9f69e92ae935c16717957a6ea66324 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 5 Aug 2010 16:41:51 -0700 Subject: uhd: created subdevice pair struct for subdev spec (easier than first/second) --- host/lib/usrp/usrp2/mboard_impl.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'host/lib/usrp/usrp2') 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(); //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(), _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(), _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() + _dboard_manager->get_rx_subdev(_rx_subdev_spec.front().sd_name)[SUBDEV_PROP_CONNECTION].as() )); return; @@ -340,16 +340,16 @@ void usrp2_mboard_impl::set(const wax::obj &key, const wax::obj &val){ _tx_subdev_spec = val.as(); //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(), _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(), _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() + _dboard_manager->get_tx_subdev(_tx_subdev_spec.front().sd_name)[SUBDEV_PROP_CONNECTION].as() )); return; -- cgit v1.2.3