summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-08-15 21:34:16 -0700
committerJosh Blum <josh@joshknows.com>2010-08-15 21:34:16 -0700
commit58519b292b561cbec5eb41c85f85c8c6bd4a06fe (patch)
tree23b2bf3e639640364cc29ff5105977c3a4d2cd17 /host/lib/usrp/usrp2
parent7b084e3af206afa20ff5a026ebf5d7e49a755def (diff)
downloaduhd-58519b292b561cbec5eb41c85f85c8c6bd4a06fe.tar.gz
uhd-58519b292b561cbec5eb41c85f85c8c6bd4a06fe.tar.bz2
uhd-58519b292b561cbec5eb41c85f85c8c6bd4a06fe.zip
usrp: moved usrp utils into public include space
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r--host/lib/usrp/usrp2/dboard_impl.cpp4
-rw-r--r--host/lib/usrp/usrp2/dsp_impl.cpp10
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp4
3 files changed, 9 insertions, 9 deletions
diff --git a/host/lib/usrp/usrp2/dboard_impl.cpp b/host/lib/usrp/usrp2/dboard_impl.cpp
index bafeb3f15..99599f11a 100644
--- a/host/lib/usrp/usrp2/dboard_impl.cpp
+++ b/host/lib/usrp/usrp2/dboard_impl.cpp
@@ -17,8 +17,8 @@
#include "usrp2_impl.hpp"
#include "usrp2_regs.hpp"
-#include "../dsp_utils.hpp"
-#include "../misc_utils.hpp"
+#include <uhd/usrp/misc_utils.hpp>
+#include <uhd/usrp/dsp_utils.hpp>
#include <uhd/usrp/subdev_props.hpp>
#include <uhd/usrp/dboard_props.hpp>
#include <uhd/utils/assert.hpp>
diff --git a/host/lib/usrp/usrp2/dsp_impl.cpp b/host/lib/usrp/usrp2/dsp_impl.cpp
index 7d9cdc441..347ec38af 100644
--- a/host/lib/usrp/usrp2/dsp_impl.cpp
+++ b/host/lib/usrp/usrp2/dsp_impl.cpp
@@ -17,9 +17,10 @@
#include "usrp2_impl.hpp"
#include "usrp2_regs.hpp"
-#include "../dsp_utils.hpp"
+#include <uhd/usrp/dsp_utils.hpp>
#include <uhd/usrp/dsp_props.hpp>
#include <boost/bind.hpp>
+#include <cmath>
using namespace uhd;
using namespace uhd::usrp;
@@ -30,10 +31,9 @@ static const size_t default_interp = 16;
/***********************************************************************
* DDC Helper Methods
**********************************************************************/
-template <class rate_t> static rate_t
-pick_closest_rate(double exact_rate, const std::vector<rate_t> &rates){
- rate_t closest_match = rates.at(0);
- BOOST_FOREACH(rate_t possible_rate, rates){
+static unsigned pick_closest_rate(double exact_rate, const std::vector<unsigned> &rates){
+ unsigned closest_match = rates.front();
+ BOOST_FOREACH(unsigned possible_rate, rates){
if(std::abs(exact_rate - possible_rate) < std::abs(exact_rate - closest_match))
closest_match = possible_rate;
}
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index d354a943b..e3c5d5ed6 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -17,8 +17,8 @@
#include "usrp2_impl.hpp"
#include "usrp2_regs.hpp"
-#include "../misc_utils.hpp"
-#include "../dsp_utils.hpp"
+#include <uhd/usrp/misc_utils.hpp>
+#include <uhd/usrp/dsp_utils.hpp>
#include <uhd/usrp/mboard_props.hpp>
#include <uhd/utils/assert.hpp>
#include <uhd/utils/algorithm.hpp>