aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/dboard/db_rfx.cpp28
-rw-r--r--host/lib/usrp/dboard_base.cpp6
-rw-r--r--host/lib/usrp/dboard_manager.cpp34
-rw-r--r--host/lib/usrp/usrp2/dboard_iface.cpp26
-rw-r--r--host/lib/usrp/usrp2/dboard_impl.cpp4
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.hpp2
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.hpp2
7 files changed, 51 insertions, 51 deletions
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp
index 1cb39f83c..e5dc16808 100644
--- a/host/lib/usrp/dboard/db_rfx.cpp
+++ b/host/lib/usrp/dboard/db_rfx.cpp
@@ -112,19 +112,19 @@ rfx_xcvr::rfx_xcvr(
_freq_range = freq_range;
//enable the clocks that we need
- this->get_interface()->set_clock_enabled(dboard_interface::UNIT_TX, true);
- this->get_interface()->set_clock_enabled(dboard_interface::UNIT_RX, true);
+ this->get_iface()->set_clock_enabled(dboard_iface::UNIT_TX, true);
+ this->get_iface()->set_clock_enabled(dboard_iface::UNIT_RX, true);
//set the gpio directions
boost::uint16_t output_enables = POWER_UP | ANT_SW | MIX_EN;
- this->get_interface()->set_gpio_ddr(dboard_interface::UNIT_TX, output_enables);
- this->get_interface()->set_gpio_ddr(dboard_interface::UNIT_RX, output_enables);
+ this->get_iface()->set_gpio_ddr(dboard_iface::UNIT_TX, output_enables);
+ this->get_iface()->set_gpio_ddr(dboard_iface::UNIT_RX, output_enables);
//setup the tx atr (this does not change with antenna)
- this->get_interface()->set_atr_reg(dboard_interface::UNIT_TX, dboard_interface::ATR_REG_IDLE, POWER_UP | ANT_SW);
- this->get_interface()->set_atr_reg(dboard_interface::UNIT_TX, dboard_interface::ATR_REG_RX_ONLY, POWER_UP | ANT_SW);
- this->get_interface()->set_atr_reg(dboard_interface::UNIT_TX, dboard_interface::ATR_REG_TX_ONLY, POWER_UP | MIX_EN);
- this->get_interface()->set_atr_reg(dboard_interface::UNIT_TX, dboard_interface::ATR_REG_FULL_DUPLEX, POWER_UP | MIX_EN);
+ this->get_iface()->set_atr_reg(dboard_iface::UNIT_TX, dboard_iface::ATR_REG_IDLE, POWER_UP | ANT_SW);
+ this->get_iface()->set_atr_reg(dboard_iface::UNIT_TX, dboard_iface::ATR_REG_RX_ONLY, POWER_UP | ANT_SW);
+ this->get_iface()->set_atr_reg(dboard_iface::UNIT_TX, dboard_iface::ATR_REG_TX_ONLY, POWER_UP | MIX_EN);
+ this->get_iface()->set_atr_reg(dboard_iface::UNIT_TX, dboard_iface::ATR_REG_FULL_DUPLEX, POWER_UP | MIX_EN);
//set some default values
set_lo_freq((_freq_range.min + _freq_range.max)/2.0);
@@ -148,10 +148,10 @@ void rfx_xcvr::set_rx_ant(const std::string &ant){
boost::uint16_t ant_val = (ant == "tx/rx")? 0 : ANT_SW;
//set the rx atr regs
- this->get_interface()->set_atr_reg(dboard_interface::UNIT_RX, dboard_interface::ATR_REG_IDLE, POWER_UP | ant_val);
- this->get_interface()->set_atr_reg(dboard_interface::UNIT_RX, dboard_interface::ATR_REG_RX_ONLY, POWER_UP | ant_val | MIX_EN);
- this->get_interface()->set_atr_reg(dboard_interface::UNIT_RX, dboard_interface::ATR_REG_TX_ONLY, POWER_UP | ant_val);
- this->get_interface()->set_atr_reg(dboard_interface::UNIT_RX, dboard_interface::ATR_REG_FULL_DUPLEX, POWER_UP | ant_val | MIX_EN);
+ this->get_iface()->set_atr_reg(dboard_iface::UNIT_RX, dboard_iface::ATR_REG_IDLE, POWER_UP | ant_val);
+ this->get_iface()->set_atr_reg(dboard_iface::UNIT_RX, dboard_iface::ATR_REG_RX_ONLY, POWER_UP | ant_val | MIX_EN);
+ this->get_iface()->set_atr_reg(dboard_iface::UNIT_RX, dboard_iface::ATR_REG_TX_ONLY, POWER_UP | ant_val);
+ this->get_iface()->set_atr_reg(dboard_iface::UNIT_RX, dboard_iface::ATR_REG_FULL_DUPLEX, POWER_UP | ant_val | MIX_EN);
}
void rfx_xcvr::set_rx_pga0_gain(float gain){
@@ -165,8 +165,8 @@ void rfx_xcvr::reload_adf4360_regs(void){
(adf4360_regs_t::ADDR_RCOUNTER)
;
BOOST_FOREACH(adf4360_regs_t::addr_t addr, addrs){
- this->get_interface()->write_spi(
- dboard_interface::UNIT_TX,
+ this->get_iface()->write_spi(
+ dboard_iface::UNIT_TX,
spi_config_t::EDGE_RISE,
_adf4360_regs.get_reg(addr), 24
);
diff --git a/host/lib/usrp/dboard_base.cpp b/host/lib/usrp/dboard_base.cpp
index 09d3bbfd4..68e4743d1 100644
--- a/host/lib/usrp/dboard_base.cpp
+++ b/host/lib/usrp/dboard_base.cpp
@@ -25,7 +25,7 @@ using namespace uhd::usrp;
* dboard_base dboard dboard_base class
**********************************************************************/
dboard_base::dboard_base(ctor_args_t const& args){
- boost::tie(_subdev_name, _dboard_interface, _rx_id, _tx_id) = args;
+ boost::tie(_subdev_name, _dboard_iface, _rx_id, _tx_id) = args;
}
dboard_base::~dboard_base(void){
@@ -36,8 +36,8 @@ std::string dboard_base::get_subdev_name(void){
return _subdev_name;
}
-dboard_interface::sptr dboard_base::get_interface(void){
- return _dboard_interface;
+dboard_iface::sptr dboard_base::get_iface(void){
+ return _dboard_iface;
}
dboard_id_t dboard_base::get_rx_id(void){
diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp
index 5e62b5564..06f8c55b6 100644
--- a/host/lib/usrp/dboard_manager.cpp
+++ b/host/lib/usrp/dboard_manager.cpp
@@ -125,11 +125,11 @@ public:
dboard_manager_impl(
dboard_id_t rx_dboard_id,
dboard_id_t tx_dboard_id,
- dboard_interface::sptr interface
+ dboard_iface::sptr iface
);
~dboard_manager_impl(void);
- //dboard_interface
+ //dboard_iface
prop_names_t get_rx_subdev_names(void);
prop_names_t get_tx_subdev_names(void);
wax::obj get_rx_subdev(const std::string &subdev_name);
@@ -141,7 +141,7 @@ private:
//the subdevice proxy is internal to the cpp file
uhd::dict<std::string, subdev_proxy::sptr> _rx_dboards;
uhd::dict<std::string, subdev_proxy::sptr> _tx_dboards;
- dboard_interface::sptr _interface;
+ dboard_iface::sptr _iface;
void set_nice_dboard_if(void);
};
@@ -151,10 +151,10 @@ private:
dboard_manager::sptr dboard_manager::make(
dboard_id_t rx_dboard_id,
dboard_id_t tx_dboard_id,
- dboard_interface::sptr interface
+ dboard_iface::sptr iface
){
return dboard_manager::sptr(
- new dboard_manager_impl(rx_dboard_id, tx_dboard_id, interface)
+ new dboard_manager_impl(rx_dboard_id, tx_dboard_id, iface)
);
}
@@ -190,9 +190,9 @@ static args_t get_dboard_args(
dboard_manager_impl::dboard_manager_impl(
dboard_id_t rx_dboard_id,
dboard_id_t tx_dboard_id,
- dboard_interface::sptr interface
+ dboard_iface::sptr iface
){
- _interface = interface;
+ _iface = iface;
dboard_ctor_t rx_dboard_ctor; std::string rx_name; prop_names_t rx_subdevs;
boost::tie(rx_dboard_ctor, rx_name, rx_subdevs) = get_dboard_args(rx_dboard_id, "rx");
@@ -208,7 +208,7 @@ dboard_manager_impl::dboard_manager_impl(
ASSERT_THROW(rx_subdevs == tx_subdevs);
BOOST_FOREACH(const std::string &subdev, rx_subdevs){
dboard_base::sptr xcvr_dboard = rx_dboard_ctor(
- dboard_base::ctor_args_t(subdev, interface, rx_dboard_id, tx_dboard_id)
+ dboard_base::ctor_args_t(subdev, iface, rx_dboard_id, tx_dboard_id)
);
//create a rx proxy for this xcvr board
_rx_dboards[subdev] = subdev_proxy::sptr(
@@ -226,7 +226,7 @@ dboard_manager_impl::dboard_manager_impl(
//make the rx subdevs
BOOST_FOREACH(const std::string &subdev, rx_subdevs){
dboard_base::sptr rx_dboard = rx_dboard_ctor(
- dboard_base::ctor_args_t(subdev, interface, rx_dboard_id, dboard_id::NONE)
+ dboard_base::ctor_args_t(subdev, iface, rx_dboard_id, dboard_id::NONE)
);
//create a rx proxy for this rx board
_rx_dboards[subdev] = subdev_proxy::sptr(
@@ -236,7 +236,7 @@ dboard_manager_impl::dboard_manager_impl(
//make the tx subdevs
BOOST_FOREACH(const std::string &subdev, tx_subdevs){
dboard_base::sptr tx_dboard = tx_dboard_ctor(
- dboard_base::ctor_args_t(subdev, interface, dboard_id::NONE, tx_dboard_id)
+ dboard_base::ctor_args_t(subdev, iface, dboard_id::NONE, tx_dboard_id)
);
//create a tx proxy for this tx board
_tx_dboards[subdev] = subdev_proxy::sptr(
@@ -276,15 +276,15 @@ wax::obj dboard_manager_impl::get_tx_subdev(const std::string &subdev_name){
void dboard_manager_impl::set_nice_dboard_if(void){
//make a list of possible unit types
- std::vector<dboard_interface::unit_t> units = boost::assign::list_of
- (dboard_interface::UNIT_RX)
- (dboard_interface::UNIT_TX)
+ std::vector<dboard_iface::unit_t> units = boost::assign::list_of
+ (dboard_iface::UNIT_RX)
+ (dboard_iface::UNIT_TX)
;
//set nice settings on each unit
- BOOST_FOREACH(dboard_interface::unit_t unit, units){
- _interface->set_gpio_ddr(unit, 0x0000); //all inputs
- _interface->set_atr_reg(unit, dboard_interface::ATR_REG_IDLE, 0x0000); //all low
- _interface->set_clock_enabled(unit, false); //clock off
+ BOOST_FOREACH(dboard_iface::unit_t unit, units){
+ _iface->set_gpio_ddr(unit, 0x0000); //all inputs
+ _iface->set_atr_reg(unit, dboard_iface::ATR_REG_IDLE, 0x0000); //all low
+ _iface->set_clock_enabled(unit, false); //clock off
}
}
diff --git a/host/lib/usrp/usrp2/dboard_iface.cpp b/host/lib/usrp/usrp2/dboard_iface.cpp
index d0c4bf6c1..f77dfc495 100644
--- a/host/lib/usrp/usrp2/dboard_iface.cpp
+++ b/host/lib/usrp/usrp2/dboard_iface.cpp
@@ -26,7 +26,7 @@
using namespace uhd::usrp;
-class usrp2_dboard_iface : public dboard_interface{
+class usrp2_dboard_iface : public dboard_iface{
public:
usrp2_dboard_iface(usrp2_iface::sptr iface, clock_control::sptr clk_ctrl);
~usrp2_dboard_iface(void);
@@ -68,11 +68,11 @@ private:
/***********************************************************************
* Make Function
**********************************************************************/
-dboard_interface::sptr make_usrp2_dboard_iface(
+dboard_iface::sptr make_usrp2_dboard_iface(
usrp2_iface::sptr iface,
clock_control::sptr clk_ctrl
){
- return dboard_interface::sptr(new usrp2_dboard_iface(iface, clk_ctrl));
+ return dboard_iface::sptr(new usrp2_dboard_iface(iface, clk_ctrl));
}
/***********************************************************************
@@ -117,10 +117,10 @@ void usrp2_dboard_iface::set_clock_enabled(unit_t unit, bool enb){
/***********************************************************************
* GPIO
**********************************************************************/
-static int unit_to_shift(dboard_interface::unit_t unit){
+static int unit_to_shift(dboard_iface::unit_t unit){
switch(unit){
- case dboard_interface::UNIT_RX: return 0;
- case dboard_interface::UNIT_TX: return 16;
+ case dboard_iface::UNIT_RX: return 0;
+ case dboard_iface::UNIT_TX: return 16;
}
throw std::runtime_error("unknown unit type");
}
@@ -166,10 +166,10 @@ void usrp2_dboard_iface::set_atr_reg(unit_t unit, atr_reg_t atr, boost::uint16_t
* \param unit the dboard interface unit type enum
* \return an over the wire representation
*/
-static boost::uint8_t unit_to_otw_spi_dev(dboard_interface::unit_t unit){
+static boost::uint8_t unit_to_otw_spi_dev(dboard_iface::unit_t unit){
switch(unit){
- case dboard_interface::UNIT_TX: return SPI_SS_TX_DB;
- case dboard_interface::UNIT_RX: return SPI_SS_RX_DB;
+ case dboard_iface::UNIT_TX: return SPI_SS_TX_DB;
+ case dboard_iface::UNIT_RX: return SPI_SS_RX_DB;
}
throw std::invalid_argument("unknown unit type");
}
@@ -213,7 +213,7 @@ void usrp2_dboard_iface::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);
}
-dboard_interface::byte_vector_t usrp2_dboard_iface::read_i2c(int i2c_addr, size_t num_bytes){
+dboard_iface::byte_vector_t usrp2_dboard_iface::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);
@@ -243,10 +243,10 @@ dboard_interface::byte_vector_t usrp2_dboard_iface::read_i2c(int i2c_addr, size_
* \param unit the dboard interface unit type enum
* \return an over the wire representation
*/
-static boost::uint8_t unit_to_otw(dboard_interface::unit_t unit){
+static boost::uint8_t unit_to_otw(dboard_iface::unit_t unit){
switch(unit){
- case dboard_interface::UNIT_TX: return USRP2_DIR_TX;
- case dboard_interface::UNIT_RX: return USRP2_DIR_RX;
+ case dboard_iface::UNIT_TX: return USRP2_DIR_TX;
+ case dboard_iface::UNIT_RX: return USRP2_DIR_RX;
}
throw std::invalid_argument("unknown unit type");
}
diff --git a/host/lib/usrp/usrp2/dboard_impl.cpp b/host/lib/usrp/usrp2/dboard_impl.cpp
index 4b300de68..fe74219d6 100644
--- a/host/lib/usrp/usrp2/dboard_impl.cpp
+++ b/host/lib/usrp/usrp2/dboard_impl.cpp
@@ -44,11 +44,11 @@ void usrp2_impl::dboard_init(void){
dboard_id_t tx_dboard_id = ntohs(in_data.data.dboard_ids.tx_id);
//create a new dboard interface and manager
- dboard_interface::sptr _dboard_interface(
+ dboard_iface::sptr _dboard_iface(
make_usrp2_dboard_iface(_iface, _clk_ctrl)
);
_dboard_manager = dboard_manager::make(
- rx_dboard_id, tx_dboard_id, _dboard_interface
+ rx_dboard_id, tx_dboard_id, _dboard_iface
);
//load dboards
diff --git a/host/lib/usrp/usrp2/usrp2_iface.hpp b/host/lib/usrp/usrp2/usrp2_iface.hpp
index 7b4321c0b..1298d87f1 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.hpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.hpp
@@ -19,7 +19,7 @@
#define INCLUDED_USRP2_IFACE_HPP
#include <uhd/transport/udp_simple.hpp>
-#include <uhd/usrp/dboard_interface.hpp> //spi config
+#include <uhd/usrp/dboard_iface.hpp> //spi config
#include <boost/shared_ptr.hpp>
#include <boost/utility.hpp>
#include <boost/cstdint.hpp>
diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp
index 7eea1e250..dbcee367b 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.hpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.hpp
@@ -37,7 +37,7 @@
* \param clk_ctrl the clock control object
* \return a sptr to a new dboard interface
*/
-uhd::usrp::dboard_interface::sptr make_usrp2_dboard_iface(
+uhd::usrp::dboard_iface::sptr make_usrp2_dboard_iface(
usrp2_iface::sptr iface,
clock_control::sptr clk_ctrl
);