aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/usrp2_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2012-03-11 18:35:52 -0700
committerJosh Blum <josh@joshknows.com>2012-03-23 14:36:56 -0700
commit6ff4100f0cc40fd31277672b89090ee744914c34 (patch)
tree241d8e641a31f97f53137bcb5a52f5b8c678d5f1 /host/lib/usrp/usrp2/usrp2_impl.cpp
parentd7a353461100be58eb973532ff2c1b7ddaddda52 (diff)
downloaduhd-6ff4100f0cc40fd31277672b89090ee744914c34.tar.gz
uhd-6ff4100f0cc40fd31277672b89090ee744914c34.tar.bz2
uhd-6ff4100f0cc40fd31277672b89090ee744914c34.zip
fifo ctrl: implement timed command feature detection
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_impl.cpp')
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index ec6a82572..2e3d1e479 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -579,8 +579,15 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){
static const std::vector<std::string> clock_sources = boost::assign::list_of("internal")("external")("mimo");
_tree->create<std::vector<std::string> >(mb_path / "clock_source/options").set(clock_sources);
//plug timed commands into tree here
- _tree->create<time_spec_t>(mb_path / "time/cmd")
- .subscribe(boost::bind(&usrp2_fifo_ctrl::set_time, _mbc[mb].fifo_ctrl, _1));
+ switch(_mbc[mb].iface->get_rev()){
+ case usrp2_iface::USRP_N200:
+ case usrp2_iface::USRP_N210:
+ case usrp2_iface::USRP_N200_R4:
+ case usrp2_iface::USRP_N210_R4:
+ _tree->create<time_spec_t>(mb_path / "time/cmd")
+ .subscribe(boost::bind(&usrp2_fifo_ctrl::set_time, _mbc[mb].fifo_ctrl, _1));
+ default: break; //otherwise, do not register
+ }
_tree->access<double>(mb_path / "tick_rate")
.subscribe(boost::bind(&usrp2_fifo_ctrl::set_tick_rate, _mbc[mb].fifo_ctrl, _1));