aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/multi_usrp.cpp
diff options
context:
space:
mode:
authorDerek Kozel <derek.kozel@ettus.com>2016-08-05 19:00:20 -0700
committerMartin Braun <martin.braun@ettus.com>2016-08-09 10:21:41 -0700
commit560e664199c478c8d71861b386ef65c5580e614c (patch)
tree864bd72e362d27cefb1faf83a4feae59eae44342 /host/lib/usrp/multi_usrp.cpp
parent1137dc4726160edf37a29d15b3e99d37ba941be6 (diff)
downloaduhd-560e664199c478c8d71861b386ef65c5580e614c.tar.gz
uhd-560e664199c478c8d71861b386ef65c5580e614c.tar.bz2
uhd-560e664199c478c8d71861b386ef65c5580e614c.zip
Improve LO APIs for daughterboards without configurable LOs
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r--host/lib/usrp/multi_usrp.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index b5df54a65..0c3c78fc6 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -897,7 +897,8 @@ public:
}
}
} else {
- throw uhd::runtime_error("This device does not support manual configuration of LOs");
+ // If the daughterboard doesn't expose it's LO(s) then it can only be internal
+ return "internal";
}
}
@@ -918,7 +919,8 @@ public:
}
}
} else {
- throw uhd::runtime_error("This device does not support manual configuration of LOs");
+ // If the daughterboard doesn't expose it's LO(s) then it can only be internal
+ return std::vector<std::string> {1, "internal"};
}
}
@@ -958,7 +960,8 @@ public:
}
}
} else {
- throw uhd::runtime_error("This device does not support manual configuration of LOs");
+ // If the daughterboard doesn't expose it's LO(s), assume it cannot export
+ return false;
}
}
@@ -991,7 +994,8 @@ public:
}
}
} else {
- throw uhd::runtime_error("This device does not support manual configuration of LOs");
+ // Return actual RF frequency if the daughterboard doesn't expose it's LO(s)
+ return _tree->access<double>(rx_rf_fe_root(chan) / "freq" /" value").get();
}
}
@@ -1007,7 +1011,8 @@ public:
}
}
} else {
- throw uhd::runtime_error("This device does not support manual configuration of LOs");
+ // Return the actual RF range if the daughterboard doesn't expose it's LO(s)
+ return _tree->access<meta_range_t>(rx_rf_fe_root(chan) / "freq" / "range").get();
}
}