aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1/io_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-10-11 12:12:25 -0700
committerJosh Blum <josh@joshknows.com>2011-11-03 20:37:12 -0700
commit5538048873f140f3ac2bbab12dc5b0729f68f1a5 (patch)
treeb59ea73c1f26adde73ff9434a0e37e8581f94517 /host/lib/usrp/usrp1/io_impl.cpp
parentfce49fd66f577b92482af6ad516944befa31b861 (diff)
downloaduhd-5538048873f140f3ac2bbab12dc5b0729f68f1a5.tar.gz
uhd-5538048873f140f3ac2bbab12dc5b0729f68f1a5.tar.bz2
uhd-5538048873f140f3ac2bbab12dc5b0729f68f1a5.zip
usrp1: support variable clock rate through API
Diffstat (limited to 'host/lib/usrp/usrp1/io_impl.cpp')
-rw-r--r--host/lib/usrp/usrp1/io_impl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp
index a0fdfc6bf..f46f4741b 100644
--- a/host/lib/usrp/usrp1/io_impl.cpp
+++ b/host/lib/usrp/usrp1/io_impl.cpp
@@ -441,6 +441,14 @@ void usrp1_impl::update_tx_subdev_spec(const uhd::usrp::subdev_spec_t &spec){
this->restore_tx(s);
}
+
+void usrp1_impl::update_tick_rate(const double rate){
+ //updating this variable should:
+ //update dboard iface -> it has a reference
+ //update dsp freq bounds -> publisher
+ _master_clock_rate = rate;
+}
+
double usrp1_impl::update_rx_samp_rate(size_t dspno, const double samp_rate){
const size_t div = this->has_rx_halfband()? 2 : 1;
@@ -495,6 +503,7 @@ double usrp1_impl::update_tx_samp_rate(size_t dspno, const double samp_rate){
void usrp1_impl::update_rates(void){
const fs_path mb_path = "/mboards/0";
+ this->update_tick_rate(_master_clock_rate);
BOOST_FOREACH(const std::string &name, _tree->list(mb_path / "rx_dsps")){
_tree->access<double>(mb_path / "rx_dsps" / name / "rate" / "value").update();
}