diff options
author | Josh Blum <josh@joshknows.com> | 2010-08-12 11:14:27 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-08-12 11:14:27 -0700 |
commit | 8bdc6cda2b5cc33b3eaf7f51d21d51887b77f45b (patch) | |
tree | 9aad81c1d1928793b066729c755fc35c5dda78c2 /host/lib/usrp/usrp2 | |
parent | ef6953024f1075a729e85f2511c75de337879888 (diff) | |
parent | 54048fd9b227633c724edd975347c81152ab37b2 (diff) | |
download | uhd-8bdc6cda2b5cc33b3eaf7f51d21d51887b77f45b.tar.gz uhd-8bdc6cda2b5cc33b3eaf7f51d21d51887b77f45b.tar.bz2 uhd-8bdc6cda2b5cc33b3eaf7f51d21d51887b77f45b.zip |
Merge branch 'subdev_spec'
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r-- | host/lib/usrp/usrp2/mboard_impl.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp index 610aade14..fe3ec6785 100644 --- a/host/lib/usrp/usrp2/mboard_impl.cpp +++ b/host/lib/usrp/usrp2/mboard_impl.cpp @@ -17,6 +17,7 @@ #include "usrp2_impl.hpp" #include "usrp2_regs.hpp" +#include "../misc_utils.hpp" #include "../dsp_utils.hpp" #include <uhd/usrp/mboard_props.hpp> #include <uhd/utils/assert.hpp> @@ -324,14 +325,9 @@ void usrp2_mboard_impl::set(const wax::obj &key, const wax::obj &val){ case MBOARD_PROP_RX_SUBDEV_SPEC: _rx_subdev_spec = val.as<subdev_spec_t>(); - //handle automatic - if (_rx_subdev_spec.empty()) _rx_subdev_spec.push_back( - subdev_spec_pair_t("", _dboard_manager->get_rx_subdev_names().front()) - ); + verify_rx_subdev_spec(_rx_subdev_spec, this->get_link()); //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().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().sd_name)[SUBDEV_PROP_CONNECTION].as<subdev_conn_t>() @@ -340,14 +336,9 @@ void usrp2_mboard_impl::set(const wax::obj &key, const wax::obj &val){ case MBOARD_PROP_TX_SUBDEV_SPEC: _tx_subdev_spec = val.as<subdev_spec_t>(); - //handle automatic - if (_tx_subdev_spec.empty()) _tx_subdev_spec.push_back( - subdev_spec_pair_t("", _dboard_manager->get_tx_subdev_names().front()) - ); + verify_tx_subdev_spec(_tx_subdev_spec, this->get_link()); //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().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().sd_name)[SUBDEV_PROP_CONNECTION].as<subdev_conn_t>() |