aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/mboard_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-01-31 16:29:12 -0800
committerJosh Blum <josh@joshknows.com>2011-01-31 16:29:12 -0800
commit625d5605dd157f9cf6f1d96e60a4d8d051817aef (patch)
tree4943b1d3fb498c8f36f574edeb1fb8ce7c66e323 /host/lib/usrp/usrp2/mboard_impl.cpp
parente16445483e1505942b7b1ddcd9fc575532fd93ba (diff)
downloaduhd-625d5605dd157f9cf6f1d96e60a4d8d051817aef.tar.gz
uhd-625d5605dd157f9cf6f1d96e60a4d8d051817aef.tar.bz2
uhd-625d5605dd157f9cf6f1d96e60a4d8d051817aef.zip
usrp: added set and get master clock rates to usrp API
implemented set and get rates in usrp1 (its all soft) implemented set and get rates in usrp2 (only 100MHz)
Diffstat (limited to 'host/lib/usrp/usrp2/mboard_impl.cpp')
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index 3e7e8b01f..784f662d9 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -355,6 +355,10 @@ void usrp2_mboard_impl::get(const wax::obj &key_, wax::obj &val){
val = _iface->mb_eeprom;
return;
+ case MBOARD_PROP_CLOCK_RATE:
+ val = this->get_master_clock_freq();
+ return;
+
default: UHD_THROW_PROP_GET_ERROR();
}
}
@@ -412,6 +416,10 @@ void usrp2_mboard_impl::set(const wax::obj &key, const wax::obj &val){
_iface->mb_eeprom = mboard_eeprom_t(*_iface, mboard_eeprom_t::MAP_N100);
return;
+ case MBOARD_PROP_CLOCK_RATE:
+ UHD_ASSERT_THROW(val.as<double>() == this->get_master_clock_freq());
+ return;
+
default: UHD_THROW_PROP_SET_ERROR();
}
}