diff options
author | Josh Blum <josh@joshknows.com> | 2010-09-30 11:05:33 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-09-30 11:05:33 -0700 |
commit | a4f8ad59b2abc6d4b1a6c65aa2652083486e3065 (patch) | |
tree | 913ee903f92527980d8bf1f893d9f7d7a58547c7 /host/lib/usrp/dboard_manager.cpp | |
parent | b8e62bb9bf86d4804defe738b2a7140cd9417a6f (diff) | |
download | uhd-a4f8ad59b2abc6d4b1a6c65aa2652083486e3065.tar.gz uhd-a4f8ad59b2abc6d4b1a6c65aa2652083486e3065.tar.bz2 uhd-a4f8ad59b2abc6d4b1a6c65aa2652083486e3065.zip |
usrp: added subdev enabled property
the dboard manager will disable all subdevs at startup and shutdown
setting the subdev spec will enable only the subdevs in use
all dboards are currently implemented as always enabled
nothing tested
Diffstat (limited to 'host/lib/usrp/dboard_manager.cpp')
-rw-r--r-- | host/lib/usrp/dboard_manager.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp index 181f843a0..78daa1b4d 100644 --- a/host/lib/usrp/dboard_manager.cpp +++ b/host/lib/usrp/dboard_manager.cpp @@ -86,7 +86,7 @@ std::string dboard_id_t::to_pp_string(void) const{ } /*********************************************************************** - * internal helper classe + * internal helper classes **********************************************************************/ /*! * A special wax proxy object that forwards calls to a subdev. @@ -330,4 +330,14 @@ void dboard_manager_impl::set_nice_dboard_if(void){ _iface->set_pin_ctrl(unit, 0x0000); //all gpio _iface->set_clock_enabled(unit, false); //clock off } + + //disable all rx subdevices + BOOST_FOREACH(const std::string &sd_name, this->get_rx_subdev_names()){ + this->get_rx_subdev(sd_name)[SUBDEV_PROP_ENABLED] = false; + } + + //disable all tx subdevices + BOOST_FOREACH(const std::string &sd_name, this->get_tx_subdev_names()){ + this->get_tx_subdev(sd_name)[SUBDEV_PROP_ENABLED] = false; + } } |