summaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-07-01 16:08:33 -0700
committerJosh Blum <josh@joshknows.com>2010-07-05 13:45:16 -0700
commit3b1473d5a3fbfb89e9ddc5575e855644707718d0 (patch)
tree7b83663b81e8c8d4882b6a9a0291c388088a6c26 /host/lib
parent82790f3da8afe646f255da428c5936045f0e2434 (diff)
downloaduhd-3b1473d5a3fbfb89e9ddc5575e855644707718d0.tar.gz
uhd-3b1473d5a3fbfb89e9ddc5575e855644707718d0.tar.bz2
uhd-3b1473d5a3fbfb89e9ddc5575e855644707718d0.zip
usrp2: removed usrp2.hpp header, its not needed, just use the discovery/factory system
uhd: added usrp_mimo skeleton code/header
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp22
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.hpp2
2 files changed, 12 insertions, 12 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 436146a48..cdba19f50 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -35,10 +35,6 @@ using namespace uhd::usrp;
using namespace uhd::transport;
namespace asio = boost::asio;
-UHD_STATIC_BLOCK(register_usrp2_device){
- device::register_device(&usrp2::find, &usrp2::make);
-}
-
/***********************************************************************
* Helper Functions
**********************************************************************/
@@ -48,10 +44,14 @@ std::vector<std::string> split_addrs(const std::string &addrs_str){
return addrs;
}
+template <class T> std::string num2str(T num){
+ return boost::lexical_cast<std::string>(num);
+}
+
/***********************************************************************
* Discovery over the udp transport
**********************************************************************/
-uhd::device_addrs_t usrp2::find(const device_addr_t &hint){
+static uhd::device_addrs_t usrp2_find(const device_addr_t &hint){
device_addrs_t usrp2_addrs;
//return an empty list of addresses when type is set to non-usrp2
@@ -68,7 +68,7 @@ uhd::device_addrs_t usrp2::find(const device_addr_t &hint){
new_hint["addr"] = if_addrs.bcast;
//call discover with the new hint and append results
- device_addrs_t new_usrp2_addrs = usrp2::find(new_hint);
+ device_addrs_t new_usrp2_addrs = usrp2_find(new_hint);
usrp2_addrs.insert(usrp2_addrs.begin(),
new_usrp2_addrs.begin(), new_usrp2_addrs.end()
);
@@ -127,11 +127,7 @@ uhd::device_addrs_t usrp2::find(const device_addr_t &hint){
/***********************************************************************
* Make
**********************************************************************/
-template <class T> std::string num2str(T num){
- return boost::lexical_cast<std::string>(num);
-}
-
-device::sptr usrp2::make(const device_addr_t &device_addr){
+static device::sptr usrp2_make(const device_addr_t &device_addr){
//extract the receive and send buffer sizes
size_t recv_buff_size = 0, send_buff_size= 0 ;
if (device_addr.has_key("recv_buff_size")){
@@ -161,6 +157,10 @@ device::sptr usrp2::make(const device_addr_t &device_addr){
);
}
+UHD_STATIC_BLOCK(register_usrp2_device){
+ device::register_device(&usrp2_find, &usrp2_make);
+}
+
/***********************************************************************
* Structors
**********************************************************************/
diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp
index df1dba663..07e29eadd 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.hpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.hpp
@@ -22,7 +22,7 @@
#include "clock_ctrl.hpp"
#include "codec_ctrl.hpp"
#include "serdes_ctrl.hpp"
-#include <uhd/usrp/usrp2.hpp>
+#include <uhd/device.hpp>
#include <uhd/utils/pimpl.hpp>
#include <uhd/types/dict.hpp>
#include <uhd/types/otw_type.hpp>