aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/b100
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-10-31 14:30:52 -0700
committerMartin Braun <martin.braun@ettus.com>2016-11-08 08:02:22 -0800
commit99c2730bc9db270560671f2d7d173768465ed51f (patch)
treebc4df495734a075ebe2f7917cf67dec6fb7d8177 /host/lib/usrp/b100
parent218f4b0b63927110df9dbbaa8353c346eee2d98a (diff)
downloaduhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.gz
uhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.bz2
uhd-99c2730bc9db270560671f2d7d173768465ed51f.zip
Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width types)
- Also removes all references to boost/cstdint.hpp and replaces it with stdint.h (The 'correct' replacement would be <cstdint>, but not all of our compilers support that).
Diffstat (limited to 'host/lib/usrp/b100')
-rw-r--r--host/lib/usrp/b100/b100_impl.cpp22
-rw-r--r--host/lib/usrp/b100/b100_impl.hpp10
-rw-r--r--host/lib/usrp/b100/b100_regs.hpp2
-rw-r--r--host/lib/usrp/b100/clock_ctrl.cpp38
-rw-r--r--host/lib/usrp/b100/codec_ctrl.cpp38
-rw-r--r--host/lib/usrp/b100/dboard_iface.cpp74
-rw-r--r--host/lib/usrp/b100/io_impl.cpp4
-rw-r--r--host/lib/usrp/b100/usb_zero_copy_wrapper.cpp6
8 files changed, 97 insertions, 97 deletions
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp
index eec9f0e9a..d0b9d835d 100644
--- a/host/lib/usrp/b100/b100_impl.cpp
+++ b/host/lib/usrp/b100/b100_impl.cpp
@@ -37,10 +37,10 @@ using namespace uhd;
using namespace uhd::usrp;
using namespace uhd::transport;
-const boost::uint16_t B100_VENDOR_ID = 0x2500;
-const boost::uint16_t B100_PRODUCT_ID = 0x0002;
-const boost::uint16_t FX2_VENDOR_ID = 0x04b4;
-const boost::uint16_t FX2_PRODUCT_ID = 0x8613;
+const uint16_t B100_VENDOR_ID = 0x2500;
+const uint16_t B100_PRODUCT_ID = 0x0002;
+const uint16_t FX2_VENDOR_ID = 0x04b4;
+const uint16_t FX2_PRODUCT_ID = 0x8613;
static const boost::posix_time::milliseconds REENUMERATION_TIMEOUT_MS(3000);
/***********************************************************************
@@ -57,11 +57,11 @@ static device_addrs_t b100_find(const device_addr_t &hint)
//since an address and resource is intended for a different, non-USB, device.
if (hint.has_key("addr") || hint.has_key("resource")) return b100_addrs;
- boost::uint16_t vid, pid;
+ uint16_t vid, pid;
if(hint.has_key("vid") && hint.has_key("pid") && hint.has_key("type") && hint["type"] == "b100") {
- vid = uhd::cast::hexstr_cast<boost::uint16_t>(hint.get("vid"));
- pid = uhd::cast::hexstr_cast<boost::uint16_t>(hint.get("pid"));
+ vid = uhd::cast::hexstr_cast<uint16_t>(hint.get("vid"));
+ pid = uhd::cast::hexstr_cast<uint16_t>(hint.get("pid"));
} else {
vid = B100_VENDOR_ID;
pid = B100_PRODUCT_ID;
@@ -261,7 +261,7 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
//let packet padder know the LUT size in number of words32
const size_t rx_lut_size = size_t(data_xport_args.cast<double>("recv_frame_size", 0.0));
- _fifo_ctrl->poke32(TOREG(SR_PADDER+0), rx_lut_size/sizeof(boost::uint32_t));
+ _fifo_ctrl->poke32(TOREG(SR_PADDER+0), rx_lut_size/sizeof(uint32_t));
_data_transport = usb_zero_copy_make_wrapper(
usb_zero_copy::make(
@@ -526,7 +526,7 @@ b100_impl::~b100_impl(void){
void b100_impl::check_fw_compat(void){
unsigned char data[4]; //useless data buffer
- const boost::uint16_t fw_compat_num = _fx2_ctrl->usrp_control_read(
+ const uint16_t fw_compat_num = _fx2_ctrl->usrp_control_read(
VRQ_FW_COMPAT, 0, 0, data, sizeof(data)
);
if (fw_compat_num != B100_FW_COMPAT_NUM){
@@ -540,8 +540,8 @@ void b100_impl::check_fw_compat(void){
}
void b100_impl::check_fpga_compat(void){
- const boost::uint32_t fpga_compat_num = _fifo_ctrl->peek32(REG_RB_COMPAT);
- boost::uint16_t fpga_major = fpga_compat_num >> 16, fpga_minor = fpga_compat_num & 0xffff;
+ const uint32_t fpga_compat_num = _fifo_ctrl->peek32(REG_RB_COMPAT);
+ uint16_t fpga_major = fpga_compat_num >> 16, fpga_minor = fpga_compat_num & 0xffff;
if (fpga_major == 0){ //old version scheme
fpga_major = fpga_minor;
fpga_minor = 0;
diff --git a/host/lib/usrp/b100/b100_impl.hpp b/host/lib/usrp/b100/b100_impl.hpp
index 7f37030d2..ba4b3cd90 100644
--- a/host/lib/usrp/b100/b100_impl.hpp
+++ b/host/lib/usrp/b100/b100_impl.hpp
@@ -46,11 +46,11 @@
static const double B100_LINK_RATE_BPS = 256e6/5; //pratical link rate (< 480 Mbps)
static const std::string B100_FW_FILE_NAME = "usrp_b100_fw.ihx";
static const std::string B100_FPGA_FILE_NAME = "usrp_b100_fpga.bin";
-static const boost::uint16_t B100_FW_COMPAT_NUM = 4;
-static const boost::uint16_t B100_FPGA_COMPAT_NUM = 11;
-static const boost::uint32_t B100_RX_SID_BASE = 30;
-static const boost::uint32_t B100_TX_ASYNC_SID = 10;
-static const boost::uint32_t B100_CTRL_MSG_SID = 20;
+static const uint16_t B100_FW_COMPAT_NUM = 4;
+static const uint16_t B100_FPGA_COMPAT_NUM = 11;
+static const uint32_t B100_RX_SID_BASE = 30;
+static const uint32_t B100_TX_ASYNC_SID = 10;
+static const uint32_t B100_CTRL_MSG_SID = 20;
static const double B100_DEFAULT_TICK_RATE = 64e6;
static const size_t B100_MAX_PKT_BYTE_LIMIT = 2048;
static const std::string B100_EEPROM_MAP_KEY = "B100";
diff --git a/host/lib/usrp/b100/b100_regs.hpp b/host/lib/usrp/b100/b100_regs.hpp
index 48eb0460d..1498613f5 100644
--- a/host/lib/usrp/b100/b100_regs.hpp
+++ b/host/lib/usrp/b100/b100_regs.hpp
@@ -18,7 +18,7 @@
#ifndef INCLUDED_B100_REGS_HPP
#define INCLUDED_B100_REGS_HPP
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#define TOREG(x) ((x)*4)
diff --git a/host/lib/usrp/b100/clock_ctrl.cpp b/host/lib/usrp/b100/clock_ctrl.cpp
index 85f318470..5700a321a 100644
--- a/host/lib/usrp/b100/clock_ctrl.cpp
+++ b/host/lib/usrp/b100/clock_ctrl.cpp
@@ -22,7 +22,7 @@
#include <uhd/exception.hpp>
#include <uhd/utils/assert_has.hpp>
#include <uhd/utils/safe_call.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include "b100_regs.hpp" //spi slave constants
#include <boost/assign/list_of.hpp>
#include <boost/foreach.hpp>
@@ -119,8 +119,8 @@ static clock_settings_type get_clock_settings(double rate){
//X = chan_div * vco_div * R
//Y = P*B + A
- const boost::uint64_t out_rate = boost::uint64_t(rate);
- const boost::uint64_t ref_rate = boost::uint64_t(cs.get_ref_rate());
+ const uint64_t out_rate = uint64_t(rate);
+ const uint64_t ref_rate = uint64_t(cs.get_ref_rate());
const size_t gcd = size_t(boost::math::gcd(ref_rate, out_rate));
for (size_t i = 1; i <= 100; i++){
@@ -446,8 +446,8 @@ public:
}
bool get_locked(void){
- static const boost::uint8_t addr = 0x01F;
- boost::uint32_t reg = this->read_reg(addr);
+ static const uint8_t addr = 0x01F;
+ uint32_t reg = this->read_reg(addr);
_ad9522_regs.set_reg(addr, reg);
return _ad9522_regs.digital_lock_detect != 0;
}
@@ -464,26 +464,26 @@ private:
this->send_reg(0x232);
}
- void send_reg(boost::uint16_t addr){
- boost::uint32_t reg = _ad9522_regs.get_write_reg(addr);
+ void send_reg(uint16_t addr){
+ uint32_t reg = _ad9522_regs.get_write_reg(addr);
UHD_LOGV(often) << "clock control write reg: " << std::hex << reg << std::endl;
byte_vector_t buf;
- buf.push_back(boost::uint8_t(reg >> 16));
- buf.push_back(boost::uint8_t(reg >> 8));
- buf.push_back(boost::uint8_t(reg & 0xff));
+ buf.push_back(uint8_t(reg >> 16));
+ buf.push_back(uint8_t(reg >> 8));
+ buf.push_back(uint8_t(reg & 0xff));
_iface->write_i2c(0x5C, buf);
}
- boost::uint8_t read_reg(boost::uint16_t addr){
+ uint8_t read_reg(uint16_t addr){
byte_vector_t buf;
- buf.push_back(boost::uint8_t(addr >> 8));
- buf.push_back(boost::uint8_t(addr & 0xff));
+ buf.push_back(uint8_t(addr >> 8));
+ buf.push_back(uint8_t(addr & 0xff));
_iface->write_i2c(0x5C, buf);
buf = _iface->read_i2c(0x5C, 1);
- return boost::uint32_t(buf[0] & 0xFF);
+ return uint32_t(buf[0] & 0xFF);
}
void calibrate_now(void){
@@ -495,10 +495,10 @@ private:
this->send_reg(0x18);
this->latch_regs();
//wait for calibration done:
- static const boost::uint8_t addr = 0x01F;
+ static const uint8_t addr = 0x01F;
for (size_t ms10 = 0; ms10 < 100; ms10++){
boost::this_thread::sleep(boost::posix_time::milliseconds(10));
- boost::uint32_t reg = read_reg(addr);
+ uint32_t reg = read_reg(addr);
_ad9522_regs.set_reg(addr, reg);
if (_ad9522_regs.vco_calibration_finished) goto wait_for_ld;
}
@@ -507,7 +507,7 @@ private:
//wait for digital lock detect:
for (size_t ms10 = 0; ms10 < 100; ms10++){
boost::this_thread::sleep(boost::posix_time::milliseconds(10));
- boost::uint32_t reg = read_reg(addr);
+ uint32_t reg = read_reg(addr);
_ad9522_regs.set_reg(addr, reg);
if (_ad9522_regs.digital_lock_detect) return;
}
@@ -525,7 +525,7 @@ private:
void send_all_regs(void){
//setup a list of register ranges to write
- typedef std::pair<boost::uint16_t, boost::uint16_t> range_t;
+ typedef std::pair<uint16_t, uint16_t> range_t;
static const std::vector<range_t> ranges = boost::assign::list_of
(range_t(0x000, 0x000)) (range_t(0x010, 0x01F))
(range_t(0x0F0, 0x0FD)) (range_t(0x190, 0x19B))
@@ -534,7 +534,7 @@ private:
//write initial register values and latch/update
BOOST_FOREACH(const range_t &range, ranges){
- for(boost::uint16_t addr = range.first; addr <= range.second; addr++){
+ for(uint16_t addr = range.first; addr <= range.second; addr++){
this->send_reg(addr);
}
}
diff --git a/host/lib/usrp/b100/codec_ctrl.cpp b/host/lib/usrp/b100/codec_ctrl.cpp
index 04fbebded..e78608beb 100644
--- a/host/lib/usrp/b100/codec_ctrl.cpp
+++ b/host/lib/usrp/b100/codec_ctrl.cpp
@@ -22,7 +22,7 @@
#include <uhd/utils/algorithm.hpp>
#include <uhd/utils/log.hpp>
#include <uhd/utils/safe_call.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/tuple/tuple.hpp>
#include <boost/math/special_functions/round.hpp>
#include "b100_regs.hpp" //spi slave constants
@@ -59,8 +59,8 @@ public:
private:
spi_iface::sptr _iface;
ad9862_regs_t _ad9862_regs;
- void send_reg(boost::uint8_t addr);
- void recv_reg(boost::uint8_t addr);
+ void send_reg(uint8_t addr);
+ void recv_reg(uint8_t addr);
};
/***********************************************************************
@@ -109,7 +109,7 @@ b100_codec_ctrl_impl::b100_codec_ctrl_impl(spi_iface::sptr iface){
_ad9862_regs.dll_mode = ad9862_regs_t::DLL_MODE_FAST;
//write the register settings to the codec
- for (boost::uint8_t addr = 0; addr <= 25; addr++){
+ for (uint8_t addr = 0; addr <= 25; addr++){
this->send_reg(addr);
}
@@ -185,8 +185,8 @@ double b100_codec_ctrl_impl::get_rx_pga_gain(char which){
/***********************************************************************
* Codec Control AUX ADC Methods
**********************************************************************/
-static double aux_adc_to_volts(boost::uint8_t high, boost::uint8_t low){
- return double((boost::uint16_t(high) << 2) | low)*3.3/0x3ff;
+static double aux_adc_to_volts(uint8_t high, uint8_t low){
+ return double((uint16_t(high) << 2) | low)*3.3/0x3ff;
}
double b100_codec_ctrl_impl::read_aux_adc(aux_adc_t which){
@@ -227,19 +227,19 @@ double b100_codec_ctrl_impl::read_aux_adc(aux_adc_t which){
void b100_codec_ctrl_impl::write_aux_dac(aux_dac_t which, double volts){
//special case for aux dac d (aka sigma delta word)
if (which == AUX_DAC_D){
- boost::uint16_t dac_word = uhd::clip(boost::math::iround(volts*0xfff/3.3), 0, 0xfff);
- _ad9862_regs.sig_delt_11_4 = boost::uint8_t(dac_word >> 4);
- _ad9862_regs.sig_delt_3_0 = boost::uint8_t(dac_word & 0xf);
+ uint16_t dac_word = uhd::clip(boost::math::iround(volts*0xfff/3.3), 0, 0xfff);
+ _ad9862_regs.sig_delt_11_4 = uint8_t(dac_word >> 4);
+ _ad9862_regs.sig_delt_3_0 = uint8_t(dac_word & 0xf);
this->send_reg(42);
this->send_reg(43);
return;
}
//calculate the dac word for aux dac a, b, c
- boost::uint8_t dac_word = uhd::clip(boost::math::iround(volts*0xff/3.3), 0, 0xff);
+ uint8_t dac_word = uhd::clip(boost::math::iround(volts*0xff/3.3), 0, 0xff);
//setup a lookup table for the aux dac params (reg ref, reg addr)
- typedef boost::tuple<boost::uint8_t*, boost::uint8_t> dac_params_t;
+ typedef boost::tuple<uint8_t*, uint8_t> dac_params_t;
uhd::dict<aux_dac_t, dac_params_t> aux_dac_to_params = boost::assign::map_list_of
(AUX_DAC_A, dac_params_t(&_ad9862_regs.aux_dac_a, 36))
(AUX_DAC_B, dac_params_t(&_ad9862_regs.aux_dac_b, 37))
@@ -248,7 +248,7 @@ void b100_codec_ctrl_impl::write_aux_dac(aux_dac_t which, double volts){
//set the aux dac register
UHD_ASSERT_THROW(aux_dac_to_params.has_key(which));
- boost::uint8_t *reg_ref, reg_addr;
+ uint8_t *reg_ref, reg_addr;
boost::tie(reg_ref, reg_addr) = aux_dac_to_params[which];
*reg_ref = dac_word;
this->send_reg(reg_addr);
@@ -257,8 +257,8 @@ void b100_codec_ctrl_impl::write_aux_dac(aux_dac_t which, double volts){
/***********************************************************************
* Codec Control SPI Methods
**********************************************************************/
-void b100_codec_ctrl_impl::send_reg(boost::uint8_t addr){
- boost::uint32_t reg = _ad9862_regs.get_write_reg(addr);
+void b100_codec_ctrl_impl::send_reg(uint8_t addr){
+ uint32_t reg = _ad9862_regs.get_write_reg(addr);
UHD_LOGV(rarely) << "codec control write reg: " << std::hex << reg << std::endl;
_iface->transact_spi(
B100_SPI_SS_AD9862,
@@ -267,16 +267,16 @@ void b100_codec_ctrl_impl::send_reg(boost::uint8_t addr){
);
}
-void b100_codec_ctrl_impl::recv_reg(boost::uint8_t addr){
- boost::uint32_t reg = _ad9862_regs.get_read_reg(addr);
+void b100_codec_ctrl_impl::recv_reg(uint8_t addr){
+ uint32_t reg = _ad9862_regs.get_read_reg(addr);
UHD_LOGV(rarely) << "codec control read reg: " << std::hex << reg << std::endl;
- boost::uint32_t ret = _iface->transact_spi(
+ uint32_t ret = _iface->transact_spi(
B100_SPI_SS_AD9862,
spi_config_t::EDGE_RISE,
reg, 16, true /*rb*/
);
- UHD_LOGV(rarely) << "codec control read ret: " << std::hex << boost::uint16_t(ret & 0xFF) << std::endl;
- _ad9862_regs.set_reg(addr, boost::uint8_t(ret&0xff));
+ UHD_LOGV(rarely) << "codec control read ret: " << std::hex << uint16_t(ret & 0xFF) << std::endl;
+ _ad9862_regs.set_reg(addr, uint8_t(ret&0xff));
}
/***********************************************************************
diff --git a/host/lib/usrp/b100/dboard_iface.cpp b/host/lib/usrp/b100/dboard_iface.cpp
index 9829f3f09..9b90d676a 100644
--- a/host/lib/usrp/b100/dboard_iface.cpp
+++ b/host/lib/usrp/b100/dboard_iface.cpp
@@ -66,33 +66,33 @@ public:
void write_aux_dac(unit_t, aux_dac_t, double);
double read_aux_adc(unit_t, aux_adc_t);
- void set_pin_ctrl(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_pin_ctrl(unit_t unit);
- void set_atr_reg(unit_t unit, atr_reg_t reg, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
- void set_gpio_ddr(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_gpio_ddr(unit_t unit);
- void set_gpio_out(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_gpio_out(unit_t unit);
- boost::uint32_t read_gpio(unit_t unit);
+ void set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_pin_ctrl(unit_t unit);
+ void set_atr_reg(unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
+ void set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_gpio_ddr(unit_t unit);
+ void set_gpio_out(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_gpio_out(unit_t unit);
+ uint32_t read_gpio(unit_t unit);
void set_command_time(const uhd::time_spec_t& t);
uhd::time_spec_t get_command_time(void);
- void write_i2c(boost::uint16_t, const byte_vector_t &);
- byte_vector_t read_i2c(boost::uint16_t, size_t);
+ void write_i2c(uint16_t, const byte_vector_t &);
+ byte_vector_t read_i2c(uint16_t, size_t);
void write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
);
- boost::uint32_t read_write_spi(
+ uint32_t read_write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
);
@@ -167,39 +167,39 @@ double b100_dboard_iface::get_codec_rate(unit_t){
/***********************************************************************
* GPIO
**********************************************************************/
-void b100_dboard_iface::set_pin_ctrl(unit_t unit, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_pin_ctrl(unit, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void b100_dboard_iface::set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask){
+ _gpio->set_pin_ctrl(unit, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t b100_dboard_iface::get_pin_ctrl(unit_t unit){
- return static_cast<boost::uint32_t>(_gpio->get_pin_ctrl(unit));
+uint32_t b100_dboard_iface::get_pin_ctrl(unit_t unit){
+ return static_cast<uint32_t>(_gpio->get_pin_ctrl(unit));
}
-void b100_dboard_iface::set_atr_reg(unit_t unit, atr_reg_t reg, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_atr_reg(unit, reg, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void b100_dboard_iface::set_atr_reg(unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask){
+ _gpio->set_atr_reg(unit, reg, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t b100_dboard_iface::get_atr_reg(unit_t unit, atr_reg_t reg){
- return static_cast<boost::uint32_t>(_gpio->get_atr_reg(unit, reg));
+uint32_t b100_dboard_iface::get_atr_reg(unit_t unit, atr_reg_t reg){
+ return static_cast<uint32_t>(_gpio->get_atr_reg(unit, reg));
}
-void b100_dboard_iface::set_gpio_ddr(unit_t unit, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_gpio_ddr(unit, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void b100_dboard_iface::set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask){
+ _gpio->set_gpio_ddr(unit, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t b100_dboard_iface::get_gpio_ddr(unit_t unit){
- return static_cast<boost::uint32_t>(_gpio->get_gpio_ddr(unit));
+uint32_t b100_dboard_iface::get_gpio_ddr(unit_t unit){
+ return static_cast<uint32_t>(_gpio->get_gpio_ddr(unit));
}
-void b100_dboard_iface::set_gpio_out(unit_t unit, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_gpio_out(unit, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void b100_dboard_iface::set_gpio_out(unit_t unit, uint32_t value, uint32_t mask){
+ _gpio->set_gpio_out(unit, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t b100_dboard_iface::get_gpio_out(unit_t unit){
- return static_cast<boost::uint32_t>(_gpio->get_gpio_out(unit));
+uint32_t b100_dboard_iface::get_gpio_out(unit_t unit){
+ return static_cast<uint32_t>(_gpio->get_gpio_out(unit));
}
-boost::uint32_t b100_dboard_iface::read_gpio(unit_t unit){
+uint32_t b100_dboard_iface::read_gpio(unit_t unit){
return _gpio->read_gpio(unit);
}
@@ -211,7 +211,7 @@ boost::uint32_t b100_dboard_iface::read_gpio(unit_t unit){
* \param unit the dboard interface unit type enum
* \return the slave device number
*/
-static boost::uint32_t unit_to_otw_spi_dev(dboard_iface::unit_t unit){
+static uint32_t unit_to_otw_spi_dev(dboard_iface::unit_t unit){
switch(unit){
case dboard_iface::UNIT_TX: return B100_SPI_SS_TX_DB;
case dboard_iface::UNIT_RX: return B100_SPI_SS_RX_DB;
@@ -222,16 +222,16 @@ static boost::uint32_t unit_to_otw_spi_dev(dboard_iface::unit_t unit){
void b100_dboard_iface::write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
){
_spi_iface->write_spi(unit_to_otw_spi_dev(unit), config, data, num_bits);
}
-boost::uint32_t b100_dboard_iface::read_write_spi(
+uint32_t b100_dboard_iface::read_write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
){
return _spi_iface->read_spi(unit_to_otw_spi_dev(unit), config, data, num_bits);
@@ -240,11 +240,11 @@ boost::uint32_t b100_dboard_iface::read_write_spi(
/***********************************************************************
* I2C
**********************************************************************/
-void b100_dboard_iface::write_i2c(boost::uint16_t addr, const byte_vector_t &bytes){
+void b100_dboard_iface::write_i2c(uint16_t addr, const byte_vector_t &bytes){
return _i2c_iface->write_i2c(addr, bytes);
}
-byte_vector_t b100_dboard_iface::read_i2c(boost::uint16_t addr, size_t num_bytes){
+byte_vector_t b100_dboard_iface::read_i2c(uint16_t addr, size_t num_bytes){
return _i2c_iface->read_i2c(addr, num_bytes);
}
diff --git a/host/lib/usrp/b100/io_impl.cpp b/host/lib/usrp/b100/io_impl.cpp
index 86edb4ed6..c1810ed8c 100644
--- a/host/lib/usrp/b100/io_impl.cpp
+++ b/host/lib/usrp/b100/io_impl.cpp
@@ -129,7 +129,7 @@ rx_streamer::sptr b100_impl::get_rx_stream(const uhd::stream_args_t &args_){
//calculate packet size
static const size_t hdr_size = 0
- + vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
+ + vrt::max_if_hdr_words32*sizeof(uint32_t)
+ sizeof(vrt::if_packet_info_t().tlr) //forced to have trailer
- sizeof(vrt::if_packet_info_t().cid) //no class id ever used
- sizeof(vrt::if_packet_info_t().tsi) //no int time ever used
@@ -188,7 +188,7 @@ tx_streamer::sptr b100_impl::get_tx_stream(const uhd::stream_args_t &args_){
//calculate packet size
static const size_t hdr_size = 0
- + vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
+ + vrt::max_if_hdr_words32*sizeof(uint32_t)
+ sizeof(vrt::if_packet_info_t().tlr) //forced to have trailer
- sizeof(vrt::if_packet_info_t().sid) //no stream id ever used
- sizeof(vrt::if_packet_info_t().cid) //no class id ever used
diff --git a/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp b/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp
index d646fcc94..d57d57f21 100644
--- a/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp
+++ b/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp
@@ -60,9 +60,9 @@ public:
//extract this packet's memory address and length in bytes
char *mem = mrb->cast<char *>() + offset_bytes;
- const boost::uint32_t *mem32 = reinterpret_cast<const boost::uint32_t *>(mem);
+ const uint32_t *mem32 = reinterpret_cast<const uint32_t *>(mem);
const size_t words32 = (uhd::wtohx(mem32[0]) & 0xffff); //length in words32 (from VRT header)
- const size_t len = words32*sizeof(boost::uint32_t); //length in bytes
+ const size_t len = words32*sizeof(uint32_t); //length in bytes
//check if this receive buffer has been exhausted
offset_bytes += len;
@@ -100,7 +100,7 @@ public:
_ok_to_auto_flush = true;
//get a reference to the VITA header before incrementing
- const boost::uint32_t vita_header = reinterpret_cast<const boost::uint32_t *>(_mem_buffer_tip)[0];
+ const uint32_t vita_header = reinterpret_cast<const uint32_t *>(_mem_buffer_tip)[0];
_bytes_in_buffer += size();
_mem_buffer_tip += size();