aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/CMakeLists.txt22
-rw-r--r--host/lib/device.cpp4
-rw-r--r--host/lib/usrp/dboard/basic.cpp4
-rw-r--r--host/lib/usrp/dboard/dboards.hpp16
-rw-r--r--host/lib/usrp/dboard_base.cpp (renamed from host/lib/usrp/dboard/base.cpp)52
-rw-r--r--host/lib/usrp/dboard_id.cpp (renamed from host/lib/usrp/dboard/id.cpp)6
-rw-r--r--host/lib/usrp/dboard_interface.cpp (renamed from host/lib/usrp/dboard/interface.cpp)14
-rw-r--r--host/lib/usrp/dboard_manager.cpp (renamed from host/lib/usrp/dboard/manager.cpp)62
-rw-r--r--host/lib/usrp/mboard_base.cpp (renamed from host/lib/usrp/mboard/base.cpp)8
-rw-r--r--host/lib/usrp/usrp.cpp4
-rw-r--r--host/lib/usrp/usrp2.cpp (renamed from host/lib/usrp/mboard/usrp2.cpp)4
-rw-r--r--host/lib/usrp/usrp2/dboard_impl.cpp (renamed from host/lib/usrp/mboard/usrp2/dboard_impl.cpp)12
-rw-r--r--host/lib/usrp/usrp2/dboard_interface.cpp (renamed from host/lib/usrp/mboard/usrp2/dboard_interface.cpp)58
-rw-r--r--host/lib/usrp/usrp2/dboard_interface.hpp (renamed from host/lib/usrp/mboard/usrp2/dboard_interface.hpp)8
-rw-r--r--host/lib/usrp/usrp2/dsp_impl.cpp (renamed from host/lib/usrp/mboard/usrp2/dsp_impl.cpp)0
-rw-r--r--host/lib/usrp/usrp2/fw_common.h (renamed from host/lib/usrp/mboard/usrp2/fw_common.h)0
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp (renamed from host/lib/usrp/mboard/usrp2/mboard_impl.cpp)0
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp (renamed from host/lib/usrp/mboard/usrp2/usrp2_impl.cpp)1
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.hpp (renamed from host/lib/usrp/mboard/usrp2/usrp2_impl.hpp)4
19 files changed, 139 insertions, 140 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index 94dffa113..5bafc206d 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -26,17 +26,17 @@ SET(libuhd_sources
transport/udp.cpp
usrp/usrp.cpp
usrp/dboard/basic.cpp
- usrp/dboard/base.cpp
- usrp/dboard/id.cpp
- usrp/dboard/interface.cpp
- usrp/dboard/manager.cpp
- usrp/mboard/base.cpp
- usrp/mboard/usrp2.cpp
- usrp/mboard/usrp2/dboard_impl.cpp
- usrp/mboard/usrp2/dboard_interface.cpp
- usrp/mboard/usrp2/dsp_impl.cpp
- usrp/mboard/usrp2/mboard_impl.cpp
- usrp/mboard/usrp2/usrp2_impl.cpp
+ usrp/dboard_base.cpp
+ usrp/dboard_id.cpp
+ usrp/dboard_interface.cpp
+ usrp/dboard_manager.cpp
+ usrp/mboard_base.cpp
+ usrp/usrp2.cpp
+ usrp/usrp2/dboard_impl.cpp
+ usrp/usrp2/dboard_interface.cpp
+ usrp/usrp2/dsp_impl.cpp
+ usrp/usrp2/mboard_impl.cpp
+ usrp/usrp2/usrp2_impl.cpp
)
ADD_LIBRARY(uhd SHARED ${libuhd_sources})
diff --git a/host/lib/device.cpp b/host/lib/device.cpp
index 822733217..be27ac1ae 100644
--- a/host/lib/device.cpp
+++ b/host/lib/device.cpp
@@ -16,7 +16,7 @@
//
#include <uhd/usrp/usrp.hpp>
-#include <uhd/usrp/mboard/usrp2.hpp>
+#include <uhd/usrp/usrp2.hpp> //TODO remove and call discover from usrp
#include <uhd/device.hpp>
#include <boost/format.hpp>
#include <stdexcept>
@@ -34,7 +34,7 @@ device_addrs_t device::discover(const device_addr_t &hint){
device_addrs.push_back(test_device_addr);
}
else if (hint["type"] == "udp"){
- std::vector<device_addr_t> usrp2_addrs = usrp::mboard::usrp2::discover(hint);
+ std::vector<device_addr_t> usrp2_addrs = usrp::usrp2::discover(hint);
device_addrs.insert(device_addrs.begin(), usrp2_addrs.begin(), usrp2_addrs.end());
}
return device_addrs;
diff --git a/host/lib/usrp/dboard/basic.cpp b/host/lib/usrp/dboard/basic.cpp
index 35512aa5f..f39ebff2f 100644
--- a/host/lib/usrp/dboard/basic.cpp
+++ b/host/lib/usrp/dboard/basic.cpp
@@ -20,7 +20,7 @@
/***********************************************************************
* Basic RX dboard
**********************************************************************/
-basic_rx::basic_rx(ctor_args_t const& args) : rx_base(args){
+basic_rx::basic_rx(ctor_args_t const& args) : rx_dboard_base(args){
/* NOP */
}
@@ -39,7 +39,7 @@ void basic_rx::rx_set(const wax::obj &, const wax::obj &){
/***********************************************************************
* Basic TX dboard
**********************************************************************/
-basic_tx::basic_tx(ctor_args_t const& args) : tx_base(args){
+basic_tx::basic_tx(ctor_args_t const& args) : tx_dboard_base(args){
/* NOP */
}
diff --git a/host/lib/usrp/dboard/dboards.hpp b/host/lib/usrp/dboard/dboards.hpp
index 0e740856f..79b90d593 100644
--- a/host/lib/usrp/dboard/dboards.hpp
+++ b/host/lib/usrp/dboard/dboards.hpp
@@ -18,17 +18,17 @@
#ifndef INCLUDED_LOCAL_DBOARDS_HPP
#define INCLUDED_LOCAL_DBOARDS_HPP
-#include <uhd/usrp/dboard/base.hpp>
+#include <uhd/usrp/dboard_base.hpp>
-using namespace uhd::usrp::dboard;
+using namespace uhd::usrp;
/***********************************************************************
* The basic boards:
**********************************************************************/
-class basic_rx : public rx_base{
+class basic_rx : public rx_dboard_base{
public:
- static base::sptr make(ctor_args_t const& args){
- return base::sptr(new basic_rx(args));
+ static dboard_base::sptr make(ctor_args_t const& args){
+ return dboard_base::sptr(new basic_rx(args));
}
basic_rx(ctor_args_t const& args);
~basic_rx(void);
@@ -37,10 +37,10 @@ public:
void rx_set(const wax::obj &key, const wax::obj &val);
};
-class basic_tx : public tx_base{
+class basic_tx : public tx_dboard_base{
public:
- static base::sptr make(ctor_args_t const& args){
- return base::sptr(new basic_tx(args));
+ static dboard_base::sptr make(ctor_args_t const& args){
+ return dboard_base::sptr(new basic_tx(args));
}
basic_tx(ctor_args_t const& args);
~basic_tx(void);
diff --git a/host/lib/usrp/dboard/base.cpp b/host/lib/usrp/dboard_base.cpp
index 92a886407..6dd41cfd8 100644
--- a/host/lib/usrp/dboard/base.cpp
+++ b/host/lib/usrp/dboard_base.cpp
@@ -15,103 +15,103 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/usrp/dboard/base.hpp>
+#include <uhd/usrp/dboard_base.hpp>
#include <boost/format.hpp>
#include <stdexcept>
-using namespace uhd::usrp::dboard;
+using namespace uhd::usrp;
/***********************************************************************
- * base dboard base class
+ * dboard_base dboard dboard_base class
**********************************************************************/
-base::base(ctor_args_t const& args){
+dboard_base::dboard_base(ctor_args_t const& args){
boost::tie(_subdev_name, _dboard_interface, _rx_id, _tx_id) = args;
}
-base::~base(void){
+dboard_base::~dboard_base(void){
/* NOP */
}
-std::string base::get_subdev_name(void){
+std::string dboard_base::get_subdev_name(void){
return _subdev_name;
}
-interface::sptr base::get_interface(void){
+dboard_interface::sptr dboard_base::get_interface(void){
return _dboard_interface;
}
-dboard_id_t base::get_rx_id(void){
+dboard_id_t dboard_base::get_rx_id(void){
return _rx_id;
}
-dboard_id_t base::get_tx_id(void){
+dboard_id_t dboard_base::get_tx_id(void){
return _tx_id;
}
/***********************************************************************
- * xcvr dboard base class
+ * xcvr dboard dboard_base class
**********************************************************************/
-xcvr_base::xcvr_base(ctor_args_t const& args) : base(args){
+xcvr_dboard_base::xcvr_dboard_base(ctor_args_t const& args) : dboard_base(args){
if (get_rx_id() == ID_NONE){
throw std::runtime_error(str(boost::format(
"cannot create xcvr board when the rx id is \"%s\""
- ) % id::to_string(ID_NONE)));
+ ) % dboard_id::to_string(ID_NONE)));
}
if (get_tx_id() == ID_NONE){
throw std::runtime_error(str(boost::format(
"cannot create xcvr board when the tx id is \"%s\""
- ) % id::to_string(ID_NONE)));
+ ) % dboard_id::to_string(ID_NONE)));
}
}
-xcvr_base::~xcvr_base(void){
+xcvr_dboard_base::~xcvr_dboard_base(void){
/* NOP */
}
/***********************************************************************
- * rx dboard base class
+ * rx dboard dboard_base class
**********************************************************************/
-rx_base::rx_base(ctor_args_t const& args) : base(args){
+rx_dboard_base::rx_dboard_base(ctor_args_t const& args) : dboard_base(args){
if (get_tx_id() != ID_NONE){
throw std::runtime_error(str(boost::format(
"cannot create rx board when the tx id is \"%s\""
" -> expected a tx id of \"%s\""
- ) % id::to_string(get_tx_id()) % id::to_string(ID_NONE)));
+ ) % dboard_id::to_string(get_tx_id()) % dboard_id::to_string(ID_NONE)));
}
}
-rx_base::~rx_base(void){
+rx_dboard_base::~rx_dboard_base(void){
/* NOP */
}
-void rx_base::tx_get(const wax::obj &, wax::obj &){
+void rx_dboard_base::tx_get(const wax::obj &, wax::obj &){
throw std::runtime_error("cannot call tx_get on a rx dboard");
}
-void rx_base::tx_set(const wax::obj &, const wax::obj &){
+void rx_dboard_base::tx_set(const wax::obj &, const wax::obj &){
throw std::runtime_error("cannot call tx_set on a rx dboard");
}
/***********************************************************************
- * tx dboard base class
+ * tx dboard dboard_base class
**********************************************************************/
-tx_base::tx_base(ctor_args_t const& args) : base(args){
+tx_dboard_base::tx_dboard_base(ctor_args_t const& args) : dboard_base(args){
if (get_rx_id() != ID_NONE){
throw std::runtime_error(str(boost::format(
"cannot create tx board when the rx id is \"%s\""
" -> expected a rx id of \"%s\""
- ) % id::to_string(get_rx_id()) % id::to_string(ID_NONE)));
+ ) % dboard_id::to_string(get_rx_id()) % dboard_id::to_string(ID_NONE)));
}
}
-tx_base::~tx_base(void){
+tx_dboard_base::~tx_dboard_base(void){
/* NOP */
}
-void tx_base::rx_get(const wax::obj &, wax::obj &){
+void tx_dboard_base::rx_get(const wax::obj &, wax::obj &){
throw std::runtime_error("cannot call rx_get on a tx dboard");
}
-void tx_base::rx_set(const wax::obj &, const wax::obj &){
+void tx_dboard_base::rx_set(const wax::obj &, const wax::obj &){
throw std::runtime_error("cannot call rx_set on a tx dboard");
}
diff --git a/host/lib/usrp/dboard/id.cpp b/host/lib/usrp/dboard_id.cpp
index b62e469de..d2ef7cd7d 100644
--- a/host/lib/usrp/dboard/id.cpp
+++ b/host/lib/usrp/dboard_id.cpp
@@ -15,13 +15,13 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/usrp/dboard/id.hpp>
+#include <uhd/usrp/dboard_id.hpp>
#include <boost/format.hpp>
#include <uhd/dict.hpp>
-using namespace uhd::usrp::dboard;
+using namespace uhd::usrp;
-std::string id::to_string(const dboard_id_t &id){
+std::string dboard_id::to_string(const dboard_id_t &id){
//map the dboard ids to string representations
uhd::dict<dboard_id_t, std::string> id_to_str;
id_to_str[ID_NONE] = "none";
diff --git a/host/lib/usrp/dboard/interface.cpp b/host/lib/usrp/dboard_interface.cpp
index b8f6724ba..f6d6b6456 100644
--- a/host/lib/usrp/dboard/interface.cpp
+++ b/host/lib/usrp/dboard_interface.cpp
@@ -15,19 +15,19 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/usrp/dboard/interface.hpp>
+#include <uhd/usrp/dboard_interface.hpp>
-using namespace uhd::usrp::dboard;
+using namespace uhd::usrp;
-interface::interface(void){
+dboard_interface::dboard_interface(void){
/* NOP */
}
-interface::~interface(void){
+dboard_interface::~dboard_interface(void){
/* NOP */
}
-void interface::write_spi(
+void dboard_interface::write_spi(
spi_dev_t dev,
spi_push_t push,
const byte_vector_t &buf
@@ -35,7 +35,7 @@ void interface::write_spi(
transact_spi(dev, SPI_LATCH_RISE, push, buf, false); //dont readback
}
-interface::byte_vector_t interface::read_spi(
+dboard_interface::byte_vector_t dboard_interface::read_spi(
spi_dev_t dev,
spi_latch_t latch,
size_t num_bytes
@@ -44,7 +44,7 @@ interface::byte_vector_t interface::read_spi(
return transact_spi(dev, latch, SPI_PUSH_RISE, buf, true); //readback
}
-interface::byte_vector_t interface::read_write_spi(
+dboard_interface::byte_vector_t dboard_interface::read_write_spi(
spi_dev_t dev,
spi_latch_t latch,
spi_push_t push,
diff --git a/host/lib/usrp/dboard/manager.cpp b/host/lib/usrp/dboard_manager.cpp
index 337c31ad6..4d52f82e8 100644
--- a/host/lib/usrp/dboard/manager.cpp
+++ b/host/lib/usrp/dboard_manager.cpp
@@ -15,16 +15,16 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/usrp/dboard/manager.hpp>
+#include <uhd/usrp/dboard_manager.hpp>
#include <uhd/utils.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/format.hpp>
#include <boost/foreach.hpp>
-#include "dboards.hpp"
+#include "dboard/dboards.hpp"
using namespace uhd;
-using namespace uhd::usrp::dboard;
+using namespace uhd::usrp;
using namespace boost::assign;
/***********************************************************************
@@ -36,7 +36,7 @@ using namespace boost::assign;
*
* This function will be called before new boards are registered.
* This allows for internal boards to be externally overridden.
- * This function will also be called when creating a new manager
+ * This function will also be called when creating a new dboard_manager
* to ensure that the maps are filled with the entries below.
**********************************************************************/
static void register_internal_dboards(void){
@@ -44,19 +44,19 @@ static void register_internal_dboards(void){
static bool called = false;
if (called) return; called = true;
//register the known dboards (dboard id, constructor, subdev names)
- manager::register_subdevs(ID_BASIC_TX, &basic_tx::make, list_of(""));
- manager::register_subdevs(ID_BASIC_RX, &basic_rx::make, list_of("a")("b")("ab"));
+ dboard_manager::register_subdevs(ID_BASIC_TX, &basic_tx::make, list_of(""));
+ dboard_manager::register_subdevs(ID_BASIC_RX, &basic_rx::make, list_of("a")("b")("ab"));
}
/***********************************************************************
* storage and registering for dboards
**********************************************************************/
-typedef boost::tuple<manager::dboard_ctor_t, prop_names_t> args_t;
+typedef boost::tuple<dboard_manager::dboard_ctor_t, prop_names_t> args_t;
//map a dboard id to a dboard constructor
static uhd::dict<dboard_id_t, args_t> id_to_args_map;
-void manager::register_subdevs(
+void dboard_manager::register_subdevs(
dboard_id_t dboard_id,
dboard_ctor_t dboard_ctor,
const prop_names_t &subdev_names
@@ -78,7 +78,7 @@ public:
enum type_t{RX_TYPE, TX_TYPE};
//structors
- subdev_proxy(base::sptr subdev, type_t type)
+ subdev_proxy(dboard_base::sptr subdev, type_t type)
: _subdev(subdev), _type(type){
/* NOP */
}
@@ -88,8 +88,8 @@ public:
}
private:
- base::sptr _subdev;
- type_t _type;
+ dboard_base::sptr _subdev;
+ type_t _type;
//forward the get calls to the rx or tx
void get(const wax::obj &key, wax::obj &val){
@@ -109,7 +109,7 @@ private:
};
/***********************************************************************
- * dboard manager methods
+ * dboard dboard_manager methods
**********************************************************************/
static args_t get_dboard_args(
dboard_id_t dboard_id,
@@ -136,10 +136,10 @@ static args_t get_dboard_args(
return id_to_args_map[dboard_id];
}
-manager::manager(
+dboard_manager::dboard_manager(
dboard_id_t rx_dboard_id,
dboard_id_t tx_dboard_id,
- interface::sptr dboard_interface
+ dboard_interface::sptr interface
){
register_internal_dboards(); //always call first
@@ -150,21 +150,21 @@ manager::manager(
boost::tie(tx_dboard_ctor, tx_subdevs) = get_dboard_args(tx_dboard_id, "tx");
//initialize the gpio pins before creating subdevs
- dboard_interface->set_gpio_ddr(interface::GPIO_RX_BANK, 0x0000, 0xffff); //all inputs
- dboard_interface->set_gpio_ddr(interface::GPIO_TX_BANK, 0x0000, 0xffff);
+ interface->set_gpio_ddr(dboard_interface::GPIO_RX_BANK, 0x0000, 0xffff); //all inputs
+ interface->set_gpio_ddr(dboard_interface::GPIO_TX_BANK, 0x0000, 0xffff);
- dboard_interface->write_gpio(interface::GPIO_RX_BANK, 0x0000, 0xffff); //all zeros
- dboard_interface->write_gpio(interface::GPIO_TX_BANK, 0x0000, 0xffff);
+ interface->write_gpio(dboard_interface::GPIO_RX_BANK, 0x0000, 0xffff); //all zeros
+ interface->write_gpio(dboard_interface::GPIO_TX_BANK, 0x0000, 0xffff);
- dboard_interface->set_atr_reg(interface::GPIO_RX_BANK, 0x0000, 0x0000, 0x0000); //software controlled
- dboard_interface->set_atr_reg(interface::GPIO_TX_BANK, 0x0000, 0x0000, 0x0000);
+ interface->set_atr_reg(dboard_interface::GPIO_RX_BANK, 0x0000, 0x0000, 0x0000); //software controlled
+ interface->set_atr_reg(dboard_interface::GPIO_TX_BANK, 0x0000, 0x0000, 0x0000);
//make xcvr subdevs (make one subdev for both rx and tx dboards)
if (rx_dboard_ctor == tx_dboard_ctor){
ASSERT_THROW(rx_subdevs == tx_subdevs);
BOOST_FOREACH(std::string name, rx_subdevs){
- base::sptr xcvr_dboard = rx_dboard_ctor(
- base::ctor_args_t(name, dboard_interface, rx_dboard_id, tx_dboard_id)
+ dboard_base::sptr xcvr_dboard = rx_dboard_ctor(
+ dboard_base::ctor_args_t(name, interface, rx_dboard_id, tx_dboard_id)
);
//create a rx proxy for this xcvr board
_rx_dboards[name] = subdev_proxy::sptr(
@@ -181,8 +181,8 @@ manager::manager(
else{
//make the rx subdevs
BOOST_FOREACH(std::string name, rx_subdevs){
- base::sptr rx_dboard = rx_dboard_ctor(
- base::ctor_args_t(name, dboard_interface, rx_dboard_id, ID_NONE)
+ dboard_base::sptr rx_dboard = rx_dboard_ctor(
+ dboard_base::ctor_args_t(name, interface, rx_dboard_id, ID_NONE)
);
//create a rx proxy for this rx board
_rx_dboards[name] = subdev_proxy::sptr(
@@ -191,8 +191,8 @@ manager::manager(
}
//make the tx subdevs
BOOST_FOREACH(std::string name, tx_subdevs){
- base::sptr tx_dboard = tx_dboard_ctor(
- base::ctor_args_t(name, dboard_interface, ID_NONE, tx_dboard_id)
+ dboard_base::sptr tx_dboard = tx_dboard_ctor(
+ dboard_base::ctor_args_t(name, interface, ID_NONE, tx_dboard_id)
);
//create a tx proxy for this tx board
_tx_dboards[name] = subdev_proxy::sptr(
@@ -202,19 +202,19 @@ manager::manager(
}
}
-manager::~manager(void){
+dboard_manager::~dboard_manager(void){
/* NOP */
}
-prop_names_t manager::get_rx_subdev_names(void){
+prop_names_t dboard_manager::get_rx_subdev_names(void){
return _rx_dboards.get_keys();
}
-prop_names_t manager::get_tx_subdev_names(void){
+prop_names_t dboard_manager::get_tx_subdev_names(void){
return _tx_dboards.get_keys();
}
-wax::obj manager::get_rx_subdev(const std::string &subdev_name){
+wax::obj dboard_manager::get_rx_subdev(const std::string &subdev_name){
if (not _rx_dboards.has_key(subdev_name)) throw std::invalid_argument(
str(boost::format("Unknown rx subdev name %s") % subdev_name)
);
@@ -222,7 +222,7 @@ wax::obj manager::get_rx_subdev(const std::string &subdev_name){
return wax::cast<subdev_proxy::sptr>(_rx_dboards[subdev_name])->get_link();
}
-wax::obj manager::get_tx_subdev(const std::string &subdev_name){
+wax::obj dboard_manager::get_tx_subdev(const std::string &subdev_name){
if (not _tx_dboards.has_key(subdev_name)) throw std::invalid_argument(
str(boost::format("Unknown tx subdev name %s") % subdev_name)
);
diff --git a/host/lib/usrp/mboard/base.cpp b/host/lib/usrp/mboard_base.cpp
index f4f0324f3..ccf50794a 100644
--- a/host/lib/usrp/mboard/base.cpp
+++ b/host/lib/usrp/mboard_base.cpp
@@ -15,15 +15,15 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/usrp/mboard/base.hpp>
+#include <uhd/usrp/mboard_base.hpp>
#include <stdexcept>
-using namespace uhd::usrp::mboard;
+using namespace uhd::usrp;
-base::base(void){
+mboard_base::mboard_base(void){
/* NOP */
}
-base::~base(void){
+mboard_base::~mboard_base(void){
/* NOP */
}
diff --git a/host/lib/usrp/usrp.cpp b/host/lib/usrp/usrp.cpp
index 9b1603a4a..d4bae1694 100644
--- a/host/lib/usrp/usrp.cpp
+++ b/host/lib/usrp/usrp.cpp
@@ -16,7 +16,7 @@
//
#include <uhd/usrp/usrp.hpp>
-#include <uhd/usrp/mboard/usrp2.hpp>
+#include <uhd/usrp/usrp2.hpp>
#include <boost/format.hpp>
#include <boost/bind.hpp>
#include <stdexcept>
@@ -48,7 +48,7 @@ usrp::usrp(const device_addr_t &device_addr){
//TODO nothing
}
else if (device_addr["type"] == "udp"){
- _mboards[""] = mboard::base::sptr(new mboard::usrp2(device_addr));
+ _mboards[""] = mboard_base::sptr(new usrp2(device_addr));
}
}
diff --git a/host/lib/usrp/mboard/usrp2.cpp b/host/lib/usrp/usrp2.cpp
index f79ae851b..1ff363ae1 100644
--- a/host/lib/usrp/mboard/usrp2.cpp
+++ b/host/lib/usrp/usrp2.cpp
@@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/usrp/mboard/usrp2.hpp>
+#include <uhd/usrp/usrp2.hpp>
#include <uhd/device.hpp>
#include <uhd/transport/udp.hpp>
#include <boost/lexical_cast.hpp>
@@ -24,7 +24,7 @@
#include <netinet/in.h>
#include "usrp2/usrp2_impl.hpp"
-using namespace uhd::usrp::mboard;
+using namespace uhd::usrp;
/***********************************************************************
* Discovery over the udp transport
diff --git a/host/lib/usrp/mboard/usrp2/dboard_impl.cpp b/host/lib/usrp/usrp2/dboard_impl.cpp
index d127c7f87..b38a51b04 100644
--- a/host/lib/usrp/mboard/usrp2/dboard_impl.cpp
+++ b/host/lib/usrp/usrp2/dboard_impl.cpp
@@ -36,19 +36,19 @@ void usrp2_impl::dboard_init(void){
% ntohs(in_data.data.dboard_ids.tx_id) << std::endl;
//extract the dboard ids an convert them to enums
- dboard::dboard_id_t rx_dboard_id = static_cast<dboard::dboard_id_t>(
+ dboard_id_t rx_dboard_id = static_cast<dboard_id_t>(
ntohs(in_data.data.dboard_ids.rx_id)
);
- dboard::dboard_id_t tx_dboard_id = static_cast<dboard::dboard_id_t>(
+ dboard_id_t tx_dboard_id = static_cast<dboard_id_t>(
ntohs(in_data.data.dboard_ids.tx_id)
);
//create a new dboard interface and manager
- dboard::interface::sptr _dboard_interface(
- new dboard_interface(this)
+ dboard_interface::sptr _dboard_interface(
+ new usrp2_dboard_interface(this)
);
- dboard::manager::sptr _dboard_manager(
- new dboard::manager(rx_dboard_id, tx_dboard_id, _dboard_interface)
+ dboard_manager::sptr _dboard_manager(
+ new dboard_manager(rx_dboard_id, tx_dboard_id, _dboard_interface)
);
//load dboards
diff --git a/host/lib/usrp/mboard/usrp2/dboard_interface.cpp b/host/lib/usrp/usrp2/dboard_interface.cpp
index eb1caaa69..f12b101f3 100644
--- a/host/lib/usrp/mboard/usrp2/dboard_interface.cpp
+++ b/host/lib/usrp/usrp2/dboard_interface.cpp
@@ -19,27 +19,27 @@
#include "dboard_interface.hpp"
#include "usrp2_impl.hpp"
-using namespace uhd::usrp::dboard;
+using namespace uhd::usrp;
/***********************************************************************
* Structors
**********************************************************************/
-dboard_interface::dboard_interface(usrp2_impl *impl){
+usrp2_dboard_interface::usrp2_dboard_interface(usrp2_impl *impl){
_impl = impl;
}
-dboard_interface::~dboard_interface(void){
+usrp2_dboard_interface::~usrp2_dboard_interface(void){
/* NOP */
}
/***********************************************************************
* Clock Rates
**********************************************************************/
-double dboard_interface::get_rx_clock_rate(void){
+double usrp2_dboard_interface::get_rx_clock_rate(void){
return _impl->get_master_clock_freq();
}
-double dboard_interface::get_tx_clock_rate(void){
+double usrp2_dboard_interface::get_tx_clock_rate(void){
return _impl->get_master_clock_freq();
}
@@ -52,15 +52,15 @@ double dboard_interface::get_tx_clock_rate(void){
* \param bank the dboard interface gpio bank enum
* \return an over the wire representation
*/
-static uint8_t gpio_bank_to_otw(interface::gpio_bank_t bank){
+static uint8_t gpio_bank_to_otw(dboard_interface::gpio_bank_t bank){
switch(bank){
- case uhd::usrp::dboard::interface::GPIO_TX_BANK: return USRP2_DIR_TX;
- case uhd::usrp::dboard::interface::GPIO_RX_BANK: return USRP2_DIR_RX;
+ case uhd::usrp::dboard_interface::GPIO_TX_BANK: return USRP2_DIR_TX;
+ case uhd::usrp::dboard_interface::GPIO_RX_BANK: return USRP2_DIR_RX;
}
throw std::invalid_argument("unknown gpio bank type");
}
-void dboard_interface::set_gpio_ddr(gpio_bank_t bank, uint16_t value, uint16_t mask){
+void usrp2_dboard_interface::set_gpio_ddr(gpio_bank_t bank, uint16_t value, uint16_t mask){
//setup the out data
usrp2_ctrl_data_t out_data;
out_data.id = htonl(USRP2_CTRL_ID_USE_THESE_GPIO_DDR_SETTINGS_BRO);
@@ -73,7 +73,7 @@ void dboard_interface::set_gpio_ddr(gpio_bank_t bank, uint16_t value, uint16_t m
ASSERT_THROW(htonl(in_data.id) == USRP2_CTRL_ID_GOT_THE_GPIO_DDR_SETTINGS_DUDE);
}
-void dboard_interface::write_gpio(gpio_bank_t bank, uint16_t value, uint16_t mask){
+void usrp2_dboard_interface::write_gpio(gpio_bank_t bank, uint16_t value, uint16_t mask){
//setup the out data
usrp2_ctrl_data_t out_data;
out_data.id = htonl(USRP2_CTRL_ID_SET_YOUR_GPIO_PIN_OUTS_BRO);
@@ -86,7 +86,7 @@ void dboard_interface::write_gpio(gpio_bank_t bank, uint16_t value, uint16_t mas
ASSERT_THROW(htonl(in_data.id) == USRP2_CTRL_ID_I_SET_THE_GPIO_PIN_OUTS_DUDE);
}
-uint16_t dboard_interface::read_gpio(gpio_bank_t bank){
+uint16_t usrp2_dboard_interface::read_gpio(gpio_bank_t bank){
//setup the out data
usrp2_ctrl_data_t out_data;
out_data.id = htonl(USRP2_CTRL_ID_GIVE_ME_YOUR_GPIO_PIN_VALS_BRO);
@@ -98,7 +98,7 @@ uint16_t dboard_interface::read_gpio(gpio_bank_t bank){
return ntohs(in_data.data.gpio_config.value);
}
-void dboard_interface::set_atr_reg(gpio_bank_t bank, uint16_t tx_value, uint16_t rx_value, uint16_t mask){
+void usrp2_dboard_interface::set_atr_reg(gpio_bank_t bank, uint16_t tx_value, uint16_t rx_value, uint16_t mask){
//setup the out data
usrp2_ctrl_data_t out_data;
out_data.id = htonl(USRP2_CTRL_ID_USE_THESE_ATR_SETTINGS_BRO);
@@ -121,10 +121,10 @@ void dboard_interface::set_atr_reg(gpio_bank_t bank, uint16_t tx_value, uint16_t
* \param dev the dboard interface spi dev enum
* \return an over the wire representation
*/
-static uint8_t spi_dev_to_otw(interface::spi_dev_t dev){
+static uint8_t spi_dev_to_otw(dboard_interface::spi_dev_t dev){
switch(dev){
- case uhd::usrp::dboard::interface::SPI_TX_DEV: return USRP2_DIR_TX;
- case uhd::usrp::dboard::interface::SPI_RX_DEV: return USRP2_DIR_RX;
+ case uhd::usrp::dboard_interface::SPI_TX_DEV: return USRP2_DIR_TX;
+ case uhd::usrp::dboard_interface::SPI_RX_DEV: return USRP2_DIR_RX;
}
throw std::invalid_argument("unknown spi device type");
}
@@ -135,10 +135,10 @@ static uint8_t spi_dev_to_otw(interface::spi_dev_t dev){
* \param latch the dboard interface spi latch enum
* \return an over the wire representation
*/
-static uint8_t spi_latch_to_otw(interface::spi_latch_t latch){
+static uint8_t spi_latch_to_otw(dboard_interface::spi_latch_t latch){
switch(latch){
- case uhd::usrp::dboard::interface::SPI_LATCH_RISE: return USRP2_CLK_EDGE_RISE;
- case uhd::usrp::dboard::interface::SPI_LATCH_FALL: return USRP2_CLK_EDGE_FALL;
+ case uhd::usrp::dboard_interface::SPI_LATCH_RISE: return USRP2_CLK_EDGE_RISE;
+ case uhd::usrp::dboard_interface::SPI_LATCH_FALL: return USRP2_CLK_EDGE_FALL;
}
throw std::invalid_argument("unknown spi latch type");
}
@@ -149,15 +149,15 @@ static uint8_t spi_latch_to_otw(interface::spi_latch_t latch){
* \param push the dboard interface spi push enum
* \return an over the wire representation
*/
-static uint8_t spi_push_to_otw(interface::spi_push_t push){
+static uint8_t spi_push_to_otw(dboard_interface::spi_push_t push){
switch(push){
- case uhd::usrp::dboard::interface::SPI_PUSH_RISE: return USRP2_CLK_EDGE_RISE;
- case uhd::usrp::dboard::interface::SPI_PUSH_FALL: return USRP2_CLK_EDGE_FALL;
+ case uhd::usrp::dboard_interface::SPI_PUSH_RISE: return USRP2_CLK_EDGE_RISE;
+ case uhd::usrp::dboard_interface::SPI_PUSH_FALL: return USRP2_CLK_EDGE_FALL;
}
throw std::invalid_argument("unknown spi push type");
}
-interface::byte_vector_t dboard_interface::transact_spi(
+dboard_interface::byte_vector_t usrp2_dboard_interface::transact_spi(
spi_dev_t dev,
spi_latch_t latch,
spi_push_t push,
@@ -197,7 +197,7 @@ interface::byte_vector_t dboard_interface::transact_spi(
/***********************************************************************
* I2C
**********************************************************************/
-void dboard_interface::write_i2c(int i2c_addr, const byte_vector_t &buf){
+void usrp2_dboard_interface::write_i2c(int i2c_addr, const byte_vector_t &buf){
//setup the out data
usrp2_ctrl_data_t out_data;
out_data.id = htonl(USRP2_CTRL_ID_WRITE_THESE_I2C_VALUES_BRO);
@@ -217,7 +217,7 @@ void dboard_interface::write_i2c(int i2c_addr, const byte_vector_t &buf){
ASSERT_THROW(htonl(in_data.id) == USRP2_CTRL_ID_COOL_IM_DONE_I2C_WRITE_DUDE);
}
-interface::byte_vector_t dboard_interface::read_i2c(int i2c_addr, size_t num_bytes){
+dboard_interface::byte_vector_t usrp2_dboard_interface::read_i2c(int i2c_addr, size_t num_bytes){
//setup the out data
usrp2_ctrl_data_t out_data;
out_data.id = htonl(USRP2_CTRL_ID_DO_AN_I2C_READ_FOR_ME_BRO);
@@ -249,15 +249,15 @@ interface::byte_vector_t dboard_interface::read_i2c(int i2c_addr, size_t num_byt
* \param unit the dboard interface unit type enum
* \return an over the wire representation
*/
-static uint8_t spi_dev_to_otw(interface::unit_type_t unit){
+static uint8_t spi_dev_to_otw(dboard_interface::unit_type_t unit){
switch(unit){
- case uhd::usrp::dboard::interface::UNIT_TYPE_TX: return USRP2_DIR_TX;
- case uhd::usrp::dboard::interface::UNIT_TYPE_RX: return USRP2_DIR_RX;
+ case uhd::usrp::dboard_interface::UNIT_TYPE_TX: return USRP2_DIR_TX;
+ case uhd::usrp::dboard_interface::UNIT_TYPE_RX: return USRP2_DIR_RX;
}
throw std::invalid_argument("unknown unit type type");
}
-void dboard_interface::write_aux_dac(interface::unit_type_t unit, int which, int value){
+void usrp2_dboard_interface::write_aux_dac(dboard_interface::unit_type_t unit, int which, int value){
//setup the out data
usrp2_ctrl_data_t out_data;
out_data.id = htonl(USRP2_CTRL_ID_WRITE_THIS_TO_THE_AUX_DAC_BRO);
@@ -270,7 +270,7 @@ void dboard_interface::write_aux_dac(interface::unit_type_t unit, int which, int
ASSERT_THROW(htonl(in_data.id) == USRP2_CTRL_ID_DONE_WITH_THAT_AUX_DAC_DUDE);
}
-int dboard_interface::read_aux_adc(interface::unit_type_t unit, int which){
+int usrp2_dboard_interface::read_aux_adc(dboard_interface::unit_type_t unit, int which){
//setup the out data
usrp2_ctrl_data_t out_data;
out_data.id = htonl(USRP2_CTRL_ID_READ_FROM_THIS_AUX_ADC_BRO);
diff --git a/host/lib/usrp/mboard/usrp2/dboard_interface.hpp b/host/lib/usrp/usrp2/dboard_interface.hpp
index 1040e53ba..a06359e5e 100644
--- a/host/lib/usrp/mboard/usrp2/dboard_interface.hpp
+++ b/host/lib/usrp/usrp2/dboard_interface.hpp
@@ -15,18 +15,18 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/usrp/dboard/interface.hpp>
+#include <uhd/usrp/dboard_interface.hpp>
#ifndef INCLUDED_DBOARD_INTERFACE_HPP
#define INCLUDED_DBOARD_INTERFACE_HPP
class usrp2_impl; //dummy class declaration
-class dboard_interface : public uhd::usrp::dboard::interface{
+class usrp2_dboard_interface : public uhd::usrp::dboard_interface{
public:
- dboard_interface(usrp2_impl *impl);
+ usrp2_dboard_interface(usrp2_impl *impl);
- ~dboard_interface(void);
+ ~usrp2_dboard_interface(void);
void write_aux_dac(unit_type_t, int, int);
diff --git a/host/lib/usrp/mboard/usrp2/dsp_impl.cpp b/host/lib/usrp/usrp2/dsp_impl.cpp
index 22c00d99a..22c00d99a 100644
--- a/host/lib/usrp/mboard/usrp2/dsp_impl.cpp
+++ b/host/lib/usrp/usrp2/dsp_impl.cpp
diff --git a/host/lib/usrp/mboard/usrp2/fw_common.h b/host/lib/usrp/usrp2/fw_common.h
index 3def8ddaa..3def8ddaa 100644
--- a/host/lib/usrp/mboard/usrp2/fw_common.h
+++ b/host/lib/usrp/usrp2/fw_common.h
diff --git a/host/lib/usrp/mboard/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index 2e4a0715f..2e4a0715f 100644
--- a/host/lib/usrp/mboard/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
diff --git a/host/lib/usrp/mboard/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 39be8938e..dbf740f2b 100644
--- a/host/lib/usrp/mboard/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -15,7 +15,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#include <uhd/usrp/dboard/manager.hpp>
#include <boost/format.hpp>
#include <boost/bind.hpp>
#include <uhd/utils.hpp>
diff --git a/host/lib/usrp/mboard/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp
index 42fe46099..be457a91c 100644
--- a/host/lib/usrp/mboard/usrp2/usrp2_impl.hpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.hpp
@@ -22,7 +22,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
#include <uhd/transport/udp.hpp>
-#include <uhd/usrp/dboard/manager.hpp>
+#include <uhd/usrp/dboard_manager.hpp>
#include "fw_common.h"
#ifndef INCLUDED_USRP2_IMPL_HPP
@@ -116,7 +116,7 @@ private:
uhd::dict<std::string, usrp2_ref_source_t> _ref_source_dict;
//rx and tx dboard methods and objects
- uhd::usrp::dboard::manager::sptr _dboard_manager;
+ uhd::usrp::dboard_manager::sptr _dboard_manager;
void dboard_init(void);
//properties interface for rx dboard