aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-11-08 08:41:46 -0800
committerMartin Braun <martin.braun@ettus.com>2016-11-08 08:41:46 -0800
commit9b852f5f243e5cf68662b7152b5fa331a83e55fb (patch)
tree159ffe0761f78dd87e2ecc97abea14494abab4ff /host/lib/usrp/dboard
parentc66cb1bad0d881394f3519bd94f4693cceab4c64 (diff)
parent99c2730bc9db270560671f2d7d173768465ed51f (diff)
downloaduhd-9b852f5f243e5cf68662b7152b5fa331a83e55fb.tar.gz
uhd-9b852f5f243e5cf68662b7152b5fa331a83e55fb.tar.bz2
uhd-9b852f5f243e5cf68662b7152b5fa331a83e55fb.zip
Merge branch 'maint'
Diffstat (limited to 'host/lib/usrp/dboard')
-rw-r--r--host/lib/usrp/dboard/db_cbx.cpp4
-rw-r--r--host/lib/usrp/dboard/db_dbsrx.cpp26
-rw-r--r--host/lib/usrp/dboard/db_dbsrx2.cpp28
-rw-r--r--host/lib/usrp/dboard/db_rfx.cpp4
-rw-r--r--host/lib/usrp/dboard/db_sbx_common.cpp4
-rw-r--r--host/lib/usrp/dboard/db_sbx_common.hpp6
-rw-r--r--host/lib/usrp/dboard/db_sbx_version3.cpp4
-rw-r--r--host/lib/usrp/dboard/db_sbx_version4.cpp4
-rw-r--r--host/lib/usrp/dboard/db_tvrx.cpp6
-rw-r--r--host/lib/usrp/dboard/db_tvrx2.cpp128
-rw-r--r--host/lib/usrp/dboard/db_twinrx.cpp17
-rw-r--r--host/lib/usrp/dboard/db_wbx_common.cpp8
-rw-r--r--host/lib/usrp/dboard/db_wbx_common.hpp2
-rw-r--r--host/lib/usrp/dboard/db_wbx_version3.cpp2
-rw-r--r--host/lib/usrp/dboard/db_wbx_version4.cpp4
-rw-r--r--host/lib/usrp/dboard/db_xcvr2450.cpp6
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp16
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_ctrl.hpp6
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_experts.hpp20
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_gain_tables.hpp8
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_io.hpp30
21 files changed, 171 insertions, 162 deletions
diff --git a/host/lib/usrp/dboard/db_cbx.cpp b/host/lib/usrp/dboard/db_cbx.cpp
index daf9a8dfd..c27cbf58a 100644
--- a/host/lib/usrp/dboard/db_cbx.cpp
+++ b/host/lib/usrp/dboard/db_cbx.cpp
@@ -38,9 +38,9 @@ sbx_xcvr::cbx::~cbx(void){
/* NOP */
}
-void sbx_xcvr::cbx::write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs)
+void sbx_xcvr::cbx::write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs)
{
- BOOST_FOREACH(boost::uint32_t reg, regs)
+ BOOST_FOREACH(uint32_t reg, regs)
{
self_base->get_iface()->write_spi(unit, spi_config_t::EDGE_RISE, reg, 32);
}
diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp
index 6e1846fb8..f296820c5 100644
--- a/host/lib/usrp/dboard/db_dbsrx.cpp
+++ b/host/lib/usrp/dboard/db_dbsrx.cpp
@@ -74,7 +74,7 @@ private:
uhd::dict<std::string, double> _gains;
max2118_write_regs_t _max2118_write_regs;
max2118_read_regs_t _max2118_read_regs;
- boost::uint8_t _max2118_addr(void){
+ uint8_t _max2118_addr(void){
return (this->get_iface()->get_special_props().mangle_i2c_addrs)? 0x65 : 0x67;
};
@@ -82,12 +82,12 @@ private:
double set_gain(double gain, const std::string &name);
double set_bandwidth(double bandwidth);
- void send_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
- start_reg = boost::uint8_t(uhd::clip(int(start_reg), 0x0, 0x5));
- stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0x5));
+ void send_reg(uint8_t start_reg, uint8_t stop_reg){
+ start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0x5));
+ stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0x5));
- for(boost::uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(boost::uint32_t) - 1){
- int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(boost::uint32_t)) - 1 ? sizeof(boost::uint32_t) - 1 : stop_reg - start_addr + 1;
+ for(uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(uint32_t) - 1){
+ int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(uint32_t)) - 1 ? sizeof(uint32_t) - 1 : stop_reg - start_addr + 1;
//create buffer for register data (+1 for start address)
byte_vector_t regs_vector(num_bytes + 1);
@@ -110,13 +110,13 @@ private:
}
}
- void read_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
- static const boost::uint8_t status_addr = 0x0;
- start_reg = boost::uint8_t(uhd::clip(int(start_reg), 0x0, 0x1));
- stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0x1));
+ void read_reg(uint8_t start_reg, uint8_t stop_reg){
+ static const uint8_t status_addr = 0x0;
+ start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0x1));
+ stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0x1));
- for(boost::uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(boost::uint32_t)){
- int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(boost::uint32_t)) ? sizeof(boost::uint32_t) : stop_reg - start_addr + 1;
+ for(uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(uint32_t)){
+ int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(uint32_t)) ? sizeof(uint32_t) : stop_reg - start_addr + 1;
//create buffer for register data
byte_vector_t regs_vector(num_bytes);
@@ -126,7 +126,7 @@ private:
_max2118_addr(), num_bytes
);
- for(boost::uint8_t i=0; i < num_bytes; i++){
+ for(uint8_t i=0; i < num_bytes; i++){
if (i + start_addr >= status_addr){
_max2118_read_regs.set_reg(i + start_addr, regs_vector[i]);
}
diff --git a/host/lib/usrp/dboard/db_dbsrx2.cpp b/host/lib/usrp/dboard/db_dbsrx2.cpp
index 11d706ed6..21b0fd02d 100644
--- a/host/lib/usrp/dboard/db_dbsrx2.cpp
+++ b/host/lib/usrp/dboard/db_dbsrx2.cpp
@@ -68,7 +68,7 @@ private:
uhd::dict<std::string, double> _gains;
max2112_write_regs_t _max2112_write_regs;
max2112_read_regs_t _max2112_read_regs;
- boost::uint8_t _max2112_addr(){ //0x60 or 0x61 depending on which side
+ uint8_t _max2112_addr(){ //0x60 or 0x61 depending on which side
return (this->get_iface()->get_special_props().mangle_i2c_addrs)? 0x60 : 0x61;
}
@@ -76,12 +76,12 @@ private:
double set_gain(double gain, const std::string &name);
double set_bandwidth(double bandwidth);
- void send_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
- start_reg = boost::uint8_t(uhd::clip(int(start_reg), 0x0, 0xB));
- stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0xB));
+ void send_reg(uint8_t start_reg, uint8_t stop_reg){
+ start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0xB));
+ stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0xB));
- for(boost::uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(boost::uint32_t) - 1){
- int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(boost::uint32_t)) - 1 ? sizeof(boost::uint32_t) - 1 : stop_reg - start_addr + 1;
+ for(uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(uint32_t) - 1){
+ int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(uint32_t)) - 1 ? sizeof(uint32_t) - 1 : stop_reg - start_addr + 1;
//create buffer for register data (+1 for start address)
byte_vector_t regs_vector(num_bytes + 1);
@@ -104,13 +104,13 @@ private:
}
}
- void read_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
- static const boost::uint8_t status_addr = 0xC;
- start_reg = boost::uint8_t(uhd::clip(int(start_reg), 0x0, 0xD));
- stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0xD));
+ void read_reg(uint8_t start_reg, uint8_t stop_reg){
+ static const uint8_t status_addr = 0xC;
+ start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0xD));
+ stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0xD));
- for(boost::uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(boost::uint32_t)){
- int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(boost::uint32_t)) ? sizeof(boost::uint32_t) : stop_reg - start_addr + 1;
+ for(uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(uint32_t)){
+ int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(uint32_t)) ? sizeof(uint32_t) : stop_reg - start_addr + 1;
//create address to start reading register data
byte_vector_t address_vector(1);
@@ -129,7 +129,7 @@ private:
_max2112_addr(), num_bytes
);
- for(boost::uint8_t i=0; i < num_bytes; i++){
+ for(uint8_t i=0; i < num_bytes; i++){
if (i + start_addr >= status_addr){
_max2112_read_regs.set_reg(i + start_addr, regs_vector[i]);
/*
@@ -183,7 +183,7 @@ UHD_STATIC_BLOCK(reg_dbsrx2_dboard){
dbsrx2::dbsrx2(ctor_args_t args) : rx_dboard_base(args){
//send initial register settings
send_reg(0x0, 0xB);
- //for (boost::uint8_t addr=0; addr<=12; addr++) this->send_reg(addr, addr);
+ //for (uint8_t addr=0; addr<=12; addr++) this->send_reg(addr, addr);
////////////////////////////////////////////////////////////////////
// Register properties
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp
index dbb1600ec..9bbd73425 100644
--- a/host/lib/usrp/dboard/db_rfx.cpp
+++ b/host/lib/usrp/dboard/db_rfx.cpp
@@ -86,7 +86,7 @@ private:
const uhd::dict<dboard_iface::unit_t, bool> _div2;
std::string _rx_ant;
uhd::dict<std::string, double> _rx_gains;
- boost::uint16_t _power_up;
+ uint16_t _power_up;
void set_rx_ant(const std::string &ant);
void set_tx_ant(const std::string &ant);
@@ -241,7 +241,7 @@ rfx_xcvr::rfx_xcvr(
this->get_iface()->set_clock_enabled(dboard_iface::UNIT_RX, true);
//set the gpio directions and atr controls (identically)
- boost::uint16_t output_enables = POWER_IO | ANTSW_IO | MIXER_IO;
+ uint16_t output_enables = POWER_IO | ANTSW_IO | MIXER_IO;
this->get_iface()->set_pin_ctrl(dboard_iface::UNIT_TX, output_enables);
this->get_iface()->set_pin_ctrl(dboard_iface::UNIT_RX, output_enables);
this->get_iface()->set_gpio_ddr(dboard_iface::UNIT_TX, output_enables);
diff --git a/host/lib/usrp/dboard/db_sbx_common.cpp b/host/lib/usrp/dboard/db_sbx_common.cpp
index be02cf77a..efc84d7e6 100644
--- a/host/lib/usrp/dboard/db_sbx_common.cpp
+++ b/host/lib/usrp/dboard/db_sbx_common.cpp
@@ -150,7 +150,7 @@ sbx_xcvr::sbx_xcvr(ctor_args_t args) : xcvr_dboard_base(args){
////////////////////////////////////////////////////////////////////
this->get_rx_subtree()->create<device_addr_t>("tune_args").set(device_addr_t());
- boost::uint16_t rx_id = get_rx_id().to_uint16();
+ uint16_t rx_id = get_rx_id().to_uint16();
if(rx_id == 0x0054) this->get_rx_subtree()->create<std::string>("name").set("SBXv3 RX");
else if(rx_id == 0x0065) this->get_rx_subtree()->create<std::string>("name").set("SBXv4 RX");
else if(rx_id == 0x0067) this->get_rx_subtree()->create<std::string>("name").set("CBX RX");
@@ -191,7 +191,7 @@ sbx_xcvr::sbx_xcvr(ctor_args_t args) : xcvr_dboard_base(args){
////////////////////////////////////////////////////////////////////
this->get_tx_subtree()->create<device_addr_t>("tune_args").set(device_addr_t());
- boost::uint16_t tx_id = get_tx_id().to_uint16();
+ uint16_t tx_id = get_tx_id().to_uint16();
if(tx_id == 0x0055) this->get_tx_subtree()->create<std::string>("name").set("SBXv3 TX");
else if(tx_id == 0x0064) this->get_tx_subtree()->create<std::string>("name").set("SBXv4 TX");
else if(tx_id == 0x0066) this->get_tx_subtree()->create<std::string>("name").set("CBX TX");
diff --git a/host/lib/usrp/dboard/db_sbx_common.hpp b/host/lib/usrp/dboard/db_sbx_common.hpp
index c0e29f263..ad64e2267 100644
--- a/host/lib/usrp/dboard/db_sbx_common.hpp
+++ b/host/lib/usrp/dboard/db_sbx_common.hpp
@@ -200,7 +200,7 @@ protected:
private:
adf435x_iface::sptr _txlo;
adf435x_iface::sptr _rxlo;
- void write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs);
+ void write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs);
};
/*!
@@ -220,7 +220,7 @@ protected:
private:
adf435x_iface::sptr _txlo;
adf435x_iface::sptr _rxlo;
- void write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs);
+ void write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs);
};
/*!
@@ -240,7 +240,7 @@ protected:
/*! This is the registered instance of the wrapper class, sbx_base. */
sbx_xcvr *self_base;
private:
- void write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs);
+ void write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs);
max287x_iface::sptr _txlo;
max287x_iface::sptr _rxlo;
};
diff --git a/host/lib/usrp/dboard/db_sbx_version3.cpp b/host/lib/usrp/dboard/db_sbx_version3.cpp
index 76ad7b04f..bb2ba6bd6 100644
--- a/host/lib/usrp/dboard/db_sbx_version3.cpp
+++ b/host/lib/usrp/dboard/db_sbx_version3.cpp
@@ -38,9 +38,9 @@ sbx_xcvr::sbx_version3::~sbx_version3(void){
/* NOP */
}
-void sbx_xcvr::sbx_version3::write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs)
+void sbx_xcvr::sbx_version3::write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs)
{
- BOOST_FOREACH(boost::uint32_t reg, regs)
+ BOOST_FOREACH(uint32_t reg, regs)
{
self_base->get_iface()->write_spi(unit, spi_config_t::EDGE_RISE, reg, 32);
}
diff --git a/host/lib/usrp/dboard/db_sbx_version4.cpp b/host/lib/usrp/dboard/db_sbx_version4.cpp
index 639bce250..e5b6e081c 100644
--- a/host/lib/usrp/dboard/db_sbx_version4.cpp
+++ b/host/lib/usrp/dboard/db_sbx_version4.cpp
@@ -39,9 +39,9 @@ sbx_xcvr::sbx_version4::~sbx_version4(void){
/* NOP */
}
-void sbx_xcvr::sbx_version4::write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs)
+void sbx_xcvr::sbx_version4::write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs)
{
- BOOST_FOREACH(boost::uint32_t reg, regs)
+ BOOST_FOREACH(uint32_t reg, regs)
{
self_base->get_iface()->write_spi(unit, spi_config_t::EDGE_RISE, reg, 32);
}
diff --git a/host/lib/usrp/dboard/db_tvrx.cpp b/host/lib/usrp/dboard/db_tvrx.cpp
index 0f84cd68a..5c0600c61 100644
--- a/host/lib/usrp/dboard/db_tvrx.cpp
+++ b/host/lib/usrp/dboard/db_tvrx.cpp
@@ -125,7 +125,7 @@ static uhd::dict<std::string, gain_range_t> get_tvrx_gain_ranges(void) {
static const double opamp_gain = 1.22; //onboard DAC opamp gain
static const double tvrx_if_freq = 43.75e6; //IF freq of TVRX module
-static const boost::uint16_t reference_divider = 640; //clock reference divider to use
+static const uint16_t reference_divider = 640; //clock reference divider to use
static const double reference_freq = 4.0e6;
/***********************************************************************
@@ -140,7 +140,7 @@ private:
uhd::dict<std::string, double> _gains;
double _lo_freq;
tuner_4937di5_regs_t _tuner_4937di5_regs;
- boost::uint8_t _tuner_4937di5_addr(void){
+ uint8_t _tuner_4937di5_addr(void){
return (this->get_iface()->get_special_props().mangle_i2c_addrs)? 0x61 : 0x60; //ok really? we could rename that call
};
@@ -271,7 +271,7 @@ static double gain_interp(double gain, const boost::array<double, 17>& db_vector
double volts;
gain = uhd::clip<double>(gain, db_vector.front(), db_vector.back()); //let's not get carried away here
- boost::uint8_t gain_step = 0;
+ uint8_t gain_step = 0;
//find which bin we're in
for(size_t i = 0; i < db_vector.size()-1; i++) {
if(gain >= db_vector[i] && gain <= db_vector[i+1]) gain_step = i;
diff --git a/host/lib/usrp/dboard/db_tvrx2.cpp b/host/lib/usrp/dboard/db_tvrx2.cpp
index 6f0604f72..1bac81153 100644
--- a/host/lib/usrp/dboard/db_tvrx2.cpp
+++ b/host/lib/usrp/dboard/db_tvrx2.cpp
@@ -77,32 +77,32 @@ using namespace boost::assign;
* The TVRX2 types
**********************************************************************/
struct tvrx2_tda18272_rfcal_result_t {
- boost::int8_t delta_c;
- boost::int8_t c_offset;
+ int8_t delta_c;
+ int8_t c_offset;
tvrx2_tda18272_rfcal_result_t(void): delta_c(0), c_offset(0){}
};
struct tvrx2_tda18272_rfcal_coeffs_t {
- boost::uint8_t cal_number;
- boost::int32_t RF_A1;
- boost::int32_t RF_B1;
+ uint8_t cal_number;
+ int32_t RF_A1;
+ int32_t RF_B1;
tvrx2_tda18272_rfcal_coeffs_t(void): cal_number(0), RF_A1(0), RF_B1(0) {}
- tvrx2_tda18272_rfcal_coeffs_t(boost::uint32_t num): RF_A1(0), RF_B1(0) { cal_number = num; }
+ tvrx2_tda18272_rfcal_coeffs_t(uint32_t num): RF_A1(0), RF_B1(0) { cal_number = num; }
};
struct tvrx2_tda18272_cal_map_t {
- boost::array<boost::uint32_t, 4> cal_freq;
- boost::array<boost::uint8_t, 4> c_offset;
- tvrx2_tda18272_cal_map_t(boost::array<boost::uint32_t, 4> freqs, boost::array<boost::uint8_t, 4> offsets)
+ boost::array<uint32_t, 4> cal_freq;
+ boost::array<uint8_t, 4> c_offset;
+ tvrx2_tda18272_cal_map_t(boost::array<uint32_t, 4> freqs, boost::array<uint8_t, 4> offsets)
{ cal_freq = freqs; c_offset = offsets; }
};
struct tvrx2_tda18272_freq_map_t {
- boost::uint32_t rf_max;
- boost::uint8_t c_prog;
- boost::uint8_t gain_taper;
- boost::uint8_t rf_band;
- tvrx2_tda18272_freq_map_t( boost::uint32_t max, boost::uint8_t c, boost::uint8_t taper, boost::uint8_t band)
+ uint32_t rf_max;
+ uint8_t c_prog;
+ uint8_t gain_taper;
+ uint8_t rf_band;
+ tvrx2_tda18272_freq_map_t( uint32_t max, uint8_t c, uint8_t taper, uint8_t band)
{ rf_max = max; c_prog = c; gain_taper = taper; rf_band = band; }
};
@@ -119,7 +119,7 @@ static const boost::array<freq_range_t, 4> tvrx2_tda18272_rf_bands = list_of
#define TVRX2_TDA18272_FREQ_MAP_ENTRIES (565)
-static const uhd::dict<boost::uint32_t, tvrx2_tda18272_cal_map_t> tvrx2_tda18272_cal_map = map_list_of
+static const uhd::dict<uint32_t, tvrx2_tda18272_cal_map_t> tvrx2_tda18272_cal_map = map_list_of
( 0, tvrx2_tda18272_cal_map_t( list_of( 44032000)( 48128000)( 52224000)( 56320000), list_of(15)( 0)(10)(17) ) )
( 1, tvrx2_tda18272_cal_map_t( list_of( 84992000)( 89088000)( 93184000)( 97280000), list_of( 1)( 0)(-2)( 3) ) )
( 2, tvrx2_tda18272_cal_map_t( list_of(106496000)(111616000)(115712000)(123904000), list_of( 0)(-1)( 1)( 2) ) )
@@ -722,12 +722,12 @@ static const uhd::dict<std::string, std::string> tvrx2_sd_name_to_conn = map_lis
("RX2", "I")
;
-static const uhd::dict<std::string, boost::uint8_t> tvrx2_sd_name_to_i2c_addr = map_list_of
+static const uhd::dict<std::string, uint8_t> tvrx2_sd_name_to_i2c_addr = map_list_of
("RX1", 0x63)
("RX2", 0x60)
;
-static const uhd::dict<std::string, boost::uint8_t> tvrx2_sd_name_to_irq_io = map_list_of
+static const uhd::dict<std::string, uint8_t> tvrx2_sd_name_to_irq_io = map_list_of
("RX1", (RX1_IRQ))
("RX2", (RX2_IRQ))
;
@@ -760,8 +760,8 @@ private:
double _bandwidth;
uhd::dict<std::string, double> _gains;
tda18272hnm_regs_t _tda18272hnm_regs;
- uhd::dict<boost::uint32_t, tvrx2_tda18272_rfcal_result_t> _rfcal_results;
- uhd::dict<boost::uint32_t, tvrx2_tda18272_rfcal_coeffs_t> _rfcal_coeffs;
+ uhd::dict<uint32_t, tvrx2_tda18272_rfcal_result_t> _rfcal_results;
+ uhd::dict<uint32_t, tvrx2_tda18272_rfcal_coeffs_t> _rfcal_coeffs;
bool _enabled;
@@ -775,12 +775,12 @@ private:
double get_scaled_rf_freq(void);
void set_scaled_if_freq(double if_freq);
double get_scaled_if_freq(void);
- void send_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg);
- void read_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg);
+ void send_reg(uint8_t start_reg, uint8_t stop_reg);
+ void read_reg(uint8_t start_reg, uint8_t stop_reg);
- freq_range_t get_tda18272_rfcal_result_freq_range(boost::uint32_t result);
+ freq_range_t get_tda18272_rfcal_result_freq_range(uint32_t result);
void tvrx2_tda18272_init_rfcal(void);
- void tvrx2_tda18272_tune_rf_filter(boost::uint32_t uRF);
+ void tvrx2_tda18272_tune_rf_filter(uint32_t uRF);
void soft_calibration(void);
void transition_0(void);
void transition_1(void);
@@ -1103,7 +1103,7 @@ tvrx2::~tvrx2(void){
* TDA18272 Register IO Functions
**********************************************************************/
void tvrx2::set_scaled_rf_freq(double rf_freq){
- _tda18272hnm_regs.set_rf_freq(boost::uint32_t(_freq_scalar*rf_freq/1e3));
+ _tda18272hnm_regs.set_rf_freq(uint32_t(_freq_scalar*rf_freq/1e3));
}
double tvrx2::get_scaled_rf_freq(void){
@@ -1118,12 +1118,12 @@ double tvrx2::get_scaled_if_freq(void){
return _tda18272hnm_regs.if_freq*50e3/_freq_scalar;
}
-void tvrx2::send_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
- start_reg = boost::uint8_t(uhd::clip(int(start_reg), 0x0, 0x43));
- stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0x43));
+void tvrx2::send_reg(uint8_t start_reg, uint8_t stop_reg){
+ start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0x43));
+ stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0x43));
- for(boost::uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(boost::uint32_t) - 1){
- int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(boost::uint32_t)) - 1 ? sizeof(boost::uint32_t) - 1 : stop_reg - start_addr + 1;
+ for(uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(uint32_t) - 1){
+ int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(uint32_t)) - 1 ? sizeof(uint32_t) - 1 : stop_reg - start_addr + 1;
//create buffer for register data (+1 for start address)
byte_vector_t regs_vector(num_bytes + 1);
@@ -1146,13 +1146,13 @@ void tvrx2::send_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
}
}
-void tvrx2::read_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
- static const boost::uint8_t status_addr = 0x0;
- start_reg = boost::uint8_t(uhd::clip(int(start_reg), 0x0, 0x43));
- stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0x43));
+void tvrx2::read_reg(uint8_t start_reg, uint8_t stop_reg){
+ static const uint8_t status_addr = 0x0;
+ start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0x43));
+ stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0x43));
- for(boost::uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(boost::uint32_t)){
- int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(boost::uint32_t)) ? sizeof(boost::uint32_t) : stop_reg - start_addr + 1;
+ for(uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(uint32_t)){
+ int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(uint32_t)) ? sizeof(uint32_t) : stop_reg - start_addr + 1;
//create buffer for starting address
byte_vector_t start_address_vector(1);
@@ -1173,7 +1173,7 @@ void tvrx2::read_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
tvrx2_sd_name_to_i2c_addr[get_subdev_name()], num_bytes
);
- for(boost::uint8_t i=0; i < num_bytes; i++){
+ for(uint8_t i=0; i < num_bytes; i++){
if (i + start_addr >= status_addr){
_tda18272hnm_regs.set_reg(i + start_addr, regs_vector[i]);
}
@@ -1188,10 +1188,10 @@ void tvrx2::read_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
/***********************************************************************
* TDA18272 Calibration Functions
**********************************************************************/
-freq_range_t tvrx2::get_tda18272_rfcal_result_freq_range(boost::uint32_t result)
+freq_range_t tvrx2::get_tda18272_rfcal_result_freq_range(uint32_t result)
{
- uhd::dict<boost::uint32_t, freq_range_t> result_to_cal_freq_ranges_map = map_list_of
+ uhd::dict<uint32_t, freq_range_t> result_to_cal_freq_ranges_map = map_list_of
( 0, freq_range_t(
(double) tvrx2_tda18272_cal_map[0].cal_freq[_tda18272hnm_regs.rfcal_freq0] * _freq_scalar,
(double) tvrx2_tda18272_cal_map[1].cal_freq[_tda18272hnm_regs.rfcal_freq1] * _freq_scalar
@@ -1254,7 +1254,7 @@ void tvrx2::tvrx2_tda18272_init_rfcal(void)
/* read byte 0x38-0x43 */
read_reg(0x38, 0x43);
- uhd::dict<boost::uint32_t, boost::uint8_t> result_to_cal_regs = map_list_of
+ uhd::dict<uint32_t, uint8_t> result_to_cal_regs = map_list_of
( 0, _tda18272hnm_regs.rfcal_log_1)
( 1, _tda18272hnm_regs.rfcal_log_2)
( 2, _tda18272hnm_regs.rfcal_log_3)
@@ -1271,27 +1271,27 @@ void tvrx2::tvrx2_tda18272_init_rfcal(void)
// Loop through rfcal_log_* registers, initialize _rfcal_results
- BOOST_FOREACH(const boost::uint32_t &result, result_to_cal_regs.keys())
+ BOOST_FOREACH(const uint32_t &result, result_to_cal_regs.keys())
_rfcal_results[result].delta_c = result_to_cal_regs[result] > 63 ? result_to_cal_regs[result] - 128 : result_to_cal_regs[result];
/* read byte 0x26-0x2B */
read_reg(0x26, 0x2B);
// Loop through rfcal_byte_* registers, initialize _rfcal_coeffs
- BOOST_FOREACH(const boost::uint32_t &subband, _rfcal_coeffs.keys())
+ BOOST_FOREACH(const uint32_t &subband, _rfcal_coeffs.keys())
{
freq_range_t subband_freqs;
- boost::uint32_t result = _rfcal_coeffs[subband].cal_number;
+ uint32_t result = _rfcal_coeffs[subband].cal_number;
subband_freqs = get_tda18272_rfcal_result_freq_range(result);
_rfcal_coeffs[subband].RF_B1 = _rfcal_results[result].delta_c + tvrx2_tda18272_cal_map[result].c_offset[_rfcal_results[result].c_offset];
- boost::uint32_t quotient = (((_rfcal_results[result+1].delta_c + tvrx2_tda18272_cal_map[result+1].c_offset[_rfcal_results[result].c_offset])
+ uint32_t quotient = (((_rfcal_results[result+1].delta_c + tvrx2_tda18272_cal_map[result+1].c_offset[_rfcal_results[result].c_offset])
- (_rfcal_results[result].delta_c + tvrx2_tda18272_cal_map[result].c_offset[_rfcal_results[result].c_offset])) * 1000000);
- boost::uint32_t divisor = ((boost::int32_t)(subband_freqs.stop() - subband_freqs.start())/1000);
+ uint32_t divisor = ((int32_t)(subband_freqs.stop() - subband_freqs.start())/1000);
_rfcal_coeffs[subband].RF_A1 = quotient / divisor;
@@ -1302,27 +1302,27 @@ void tvrx2::tvrx2_tda18272_init_rfcal(void)
/*
* Apply calibration coefficients to RF Filter tuning
*/
-void tvrx2::tvrx2_tda18272_tune_rf_filter(boost::uint32_t uRF)
+void tvrx2::tvrx2_tda18272_tune_rf_filter(uint32_t uRF)
{
- boost::uint32_t uCounter = 0;
- boost::uint8_t cal_result = 0;
- boost::uint32_t uRFCal0 = 0;
- boost::uint32_t uRFCal1 = 0;
- boost::uint8_t subband = 0;
- boost::int32_t cProg = 0;
- boost::uint8_t gain_taper = 0;
- boost::uint8_t RFBand = 0;
- boost::int32_t RF_A1 = 0;
- boost::int32_t RF_B1 = 0;
+ uint32_t uCounter = 0;
+ uint8_t cal_result = 0;
+ uint32_t uRFCal0 = 0;
+ uint32_t uRFCal1 = 0;
+ uint8_t subband = 0;
+ int32_t cProg = 0;
+ uint8_t gain_taper = 0;
+ uint8_t RFBand = 0;
+ int32_t RF_A1 = 0;
+ int32_t RF_B1 = 0;
freq_range_t subband_freqs;
/* read byte 0x26-0x2B */
read_reg(0x26, 0x2B);
subband_freqs = get_tda18272_rfcal_result_freq_range(1);
- uRFCal0 = boost::uint32_t(subband_freqs.start());
+ uRFCal0 = uint32_t(subband_freqs.start());
subband_freqs = get_tda18272_rfcal_result_freq_range(4);
- uRFCal1 = boost::uint32_t(subband_freqs.start());
+ uRFCal1 = uint32_t(subband_freqs.start());
if(uRF < uRFCal0)
subband = 0;
@@ -1335,9 +1335,9 @@ void tvrx2::tvrx2_tda18272_tune_rf_filter(boost::uint32_t uRF)
else
{
subband_freqs = get_tda18272_rfcal_result_freq_range(7);
- uRFCal0 = boost::uint32_t(subband_freqs.start());
+ uRFCal0 = uint32_t(subband_freqs.start());
subband_freqs = get_tda18272_rfcal_result_freq_range(10);
- uRFCal1 = boost::uint32_t(subband_freqs.start());
+ uRFCal1 = uint32_t(subband_freqs.start());
if(uRF < uRFCal0)
subband = 4;
@@ -1351,7 +1351,7 @@ void tvrx2::tvrx2_tda18272_tune_rf_filter(boost::uint32_t uRF)
cal_result = _rfcal_coeffs[subband].cal_number;
subband_freqs = get_tda18272_rfcal_result_freq_range(cal_result);
- uRFCal0 = boost::uint32_t(subband_freqs.start());
+ uRFCal0 = uint32_t(subband_freqs.start());
RF_A1 = _rfcal_coeffs[subband].RF_A1;
RF_B1 = _rfcal_coeffs[subband].RF_B1;
@@ -1364,13 +1364,13 @@ void tvrx2::tvrx2_tda18272_tune_rf_filter(boost::uint32_t uRF)
gain_taper = tvrx2_tda18272_freq_map[uCounter - 1].gain_taper;
RFBand = tvrx2_tda18272_freq_map[uCounter - 1].rf_band;
- cProg = (boost::int32_t)(cProg + RF_B1 + (RF_A1*((boost::int32_t)(uRF - uRFCal0)/1000))/1000000);
+ cProg = (int32_t)(cProg + RF_B1 + (RF_A1*((int32_t)(uRF - uRFCal0)/1000))/1000000);
if(cProg>255) cProg = 255;
if(cProg<0) cProg = 0;
_tda18272hnm_regs.rf_filter_bypass = 1;
- _tda18272hnm_regs.rf_filter_cap = (boost::uint8_t) cProg;
+ _tda18272hnm_regs.rf_filter_cap = (uint8_t) cProg;
_tda18272hnm_regs.gain_taper = gain_taper;
_tda18272hnm_regs.rf_filter_band = RFBand;
@@ -1462,7 +1462,7 @@ void tvrx2::test_rf_filter_robustness(void){
read_reg(0x38, 0x43);
- uhd::dict<std::string, boost::uint8_t> filter_cal_regs = map_list_of
+ uhd::dict<std::string, uint8_t> filter_cal_regs = map_list_of
("VHFLow_0", 0x38)
("VHFLow_1", 0x3a)
("VHFHigh_0", 0x3b)
@@ -1474,7 +1474,7 @@ void tvrx2::test_rf_filter_robustness(void){
;
BOOST_FOREACH(const std::string &name, filter_cal_regs.keys()){
- boost::uint8_t cal_result = _tda18272hnm_regs.get_reg(filter_cal_regs[name]);
+ uint8_t cal_result = _tda18272hnm_regs.get_reg(filter_cal_regs[name]);
if (cal_result & 0x80) {
_filter_ratings.set(name, "E");
_filter_margins.set(name, 0.0);
diff --git a/host/lib/usrp/dboard/db_twinrx.cpp b/host/lib/usrp/dboard/db_twinrx.cpp
index 477412de0..2af6bc4ff 100644
--- a/host/lib/usrp/dboard/db_twinrx.cpp
+++ b/host/lib/usrp/dboard/db_twinrx.cpp
@@ -39,6 +39,7 @@ using namespace uhd::usrp::dboard::twinrx;
using namespace uhd::experts;
static const dboard_id_t TWINRX_V100_000_ID(0x91);
+static const dboard_id_t TWINRX_V100_100_ID(0x93);
/*!
* twinrx_rcvr_fe is the dbaord class (dboard_base) that
@@ -170,13 +171,13 @@ public:
prepend_ch("ch/preamp2", _ch_name), false);
expert_factory::add_data_node<bool>(_expert,
prepend_ch("ant/preamp2", _ch_name), false);
- expert_factory::add_data_node<boost::uint8_t>(_expert,
+ expert_factory::add_data_node<uint8_t>(_expert,
prepend_ch("ch/input_atten", _ch_name), 0);
- expert_factory::add_data_node<boost::uint8_t>(_expert,
+ expert_factory::add_data_node<uint8_t>(_expert,
prepend_ch("ant/input_atten", _ch_name), 0);
- expert_factory::add_data_node<boost::uint8_t>(_expert,
+ expert_factory::add_data_node<uint8_t>(_expert,
prepend_ch("ch/lb_atten", _ch_name), 0);
- expert_factory::add_data_node<boost::uint8_t>(_expert,
+ expert_factory::add_data_node<uint8_t>(_expert,
prepend_ch("ch/hb_atten", _ch_name), 0);
expert_factory::add_data_node<twinrx_ctrl::lo_source_t>(_expert,
prepend_ch("ch/LO1/source", _ch_name), twinrx_ctrl::LO_INTERNAL);
@@ -340,4 +341,12 @@ UHD_STATIC_BLOCK(reg_twinrx_dboards)
boost::assign::list_of("0")("1"),
&make_twinrx_container
);
+
+ dboard_manager::register_dboard_restricted(
+ TWINRX_V100_100_ID,
+ &twinrx_rcvr::make_twinrx_fe,
+ "TwinRX v1.1",
+ boost::assign::list_of("0")("1"),
+ &make_twinrx_container
+ );
}
diff --git a/host/lib/usrp/dboard/db_wbx_common.cpp b/host/lib/usrp/dboard/db_wbx_common.cpp
index 6539e798a..5afbb1f88 100644
--- a/host/lib/usrp/dboard/db_wbx_common.cpp
+++ b/host/lib/usrp/dboard/db_wbx_common.cpp
@@ -65,7 +65,7 @@ wbx_base::wbx_base(ctor_args_t args) : xcvr_dboard_base(args){
////////////////////////////////////////////////////////////////////
// Register RX and TX properties
////////////////////////////////////////////////////////////////////
- boost::uint16_t rx_id = this->get_rx_id().to_uint16();
+ uint16_t rx_id = this->get_rx_id().to_uint16();
this->get_rx_subtree()->create<device_addr_t>("tune_args").set(device_addr_t());
this->get_rx_subtree()->create<sensor_value_t>("sensors/lo_locked")
@@ -139,7 +139,7 @@ void wbx_base::set_rx_enabled(bool enb){
double wbx_base::set_rx_gain(double gain, const std::string &name){
assert_has(wbx_rx_gain_ranges.keys(), name, "wbx rx gain name");
if(name == "PGA0"){
- boost::uint16_t io_bits = rx_pga0_gain_to_iobits(gain);
+ uint16_t io_bits = rx_pga0_gain_to_iobits(gain);
_rx_gains[name] = gain;
//write the new gain to rx gpio outputs
@@ -157,8 +157,8 @@ sensor_value_t wbx_base::get_locked(dboard_iface::unit_t unit){
return sensor_value_t("LO", locked, "locked", "unlocked");
}
-void wbx_base::wbx_versionx::write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs) {
- BOOST_FOREACH(boost::uint32_t reg, regs) {
+void wbx_base::wbx_versionx::write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs) {
+ BOOST_FOREACH(uint32_t reg, regs) {
self_base->get_iface()->write_spi(unit, spi_config_t::EDGE_RISE, reg, 32);
}
}
diff --git a/host/lib/usrp/dboard/db_wbx_common.hpp b/host/lib/usrp/dboard/db_wbx_common.hpp
index 0e339e4a3..a6b2ca852 100644
--- a/host/lib/usrp/dboard/db_wbx_common.hpp
+++ b/host/lib/usrp/dboard/db_wbx_common.hpp
@@ -153,7 +153,7 @@ protected:
adf435x_iface::sptr _txlo;
adf435x_iface::sptr _rxlo;
- void write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs);
+ void write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs);
};
diff --git a/host/lib/usrp/dboard/db_wbx_version3.cpp b/host/lib/usrp/dboard/db_wbx_version3.cpp
index 4dcf3bb71..1bd326e6f 100644
--- a/host/lib/usrp/dboard/db_wbx_version3.cpp
+++ b/host/lib/usrp/dboard/db_wbx_version3.cpp
@@ -175,7 +175,7 @@ void wbx_base::wbx_version3::set_tx_enabled(bool enb){
double wbx_base::wbx_version3::set_tx_gain(double gain, const std::string &name){
assert_has(wbx_v3_tx_gain_ranges.keys(), name, "wbx tx gain name");
if(name == "PGA0"){
- boost::uint16_t io_bits = tx_pga0_gain_to_iobits(gain);
+ uint16_t io_bits = tx_pga0_gain_to_iobits(gain);
self_base->_tx_gains[name] = gain;
diff --git a/host/lib/usrp/dboard/db_wbx_version4.cpp b/host/lib/usrp/dboard/db_wbx_version4.cpp
index dc351af1d..3cc0f1887 100644
--- a/host/lib/usrp/dboard/db_wbx_version4.cpp
+++ b/host/lib/usrp/dboard/db_wbx_version4.cpp
@@ -87,7 +87,7 @@ wbx_base::wbx_version4::wbx_version4(wbx_base *_self_wbx_base) {
////////////////////////////////////////////////////////////////////
// Register RX properties
////////////////////////////////////////////////////////////////////
- boost::uint16_t rx_id = _self_wbx_base->get_rx_id().to_uint16();
+ uint16_t rx_id = _self_wbx_base->get_rx_id().to_uint16();
if(rx_id == 0x0063) this->get_rx_subtree()->create<std::string>("name").set("WBXv4 RX");
else if(rx_id == 0x0081) this->get_rx_subtree()->create<std::string>("name").set("WBX-120 RX");
@@ -182,7 +182,7 @@ void wbx_base::wbx_version4::set_tx_enabled(bool enb) {
double wbx_base::wbx_version4::set_tx_gain(double gain, const std::string &name) {
assert_has(wbx_v4_tx_gain_ranges.keys(), name, "wbx tx gain name");
if(name == "PGA0"){
- boost::uint16_t io_bits = tx_pga0_gain_to_iobits(gain);
+ uint16_t io_bits = tx_pga0_gain_to_iobits(gain);
self_base->_tx_gains[name] = gain;
diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp
index 0f839b03e..6876ee4be 100644
--- a/host/lib/usrp/dboard/db_xcvr2450.cpp
+++ b/host/lib/usrp/dboard/db_xcvr2450.cpp
@@ -133,8 +133,8 @@ private:
void update_atr(void);
void spi_reset(void);
- void send_reg(boost::uint8_t addr){
- boost::uint32_t value = _max2829_regs.get_reg(addr);
+ void send_reg(uint8_t addr){
+ uint32_t value = _max2829_regs.get_reg(addr);
UHD_LOGV(often) << boost::format(
"XCVR2450: send reg 0x%02x, value 0x%05x"
) % int(addr) % value << std::endl;
@@ -221,7 +221,7 @@ xcvr2450::xcvr2450(ctor_args_t args) : xcvr_dboard_base(args){
_max2829_regs.tx_upconv_linearity = max2829_regs_t::TX_UPCONV_LINEARITY_78;
//send initial register settings
- for(boost::uint8_t reg = 0x2; reg <= 0xC; reg++){
+ for(uint8_t reg = 0x2; reg <= 0xC; reg++){
this->send_reg(reg);
}
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp b/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp
index 172992f0a..dfbea9917 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp
@@ -27,7 +27,7 @@ using namespace usrp;
using namespace dboard::twinrx;
typedef twinrx_cpld_regmap rm;
-static boost::uint32_t bool2bin(bool x) { return x ? 1 : 0; }
+static uint32_t bool2bin(bool x) { return x ? 1 : 0; }
static const double TWINRX_DESIRED_REFERENCE_FREQ = 50e6;
@@ -224,7 +224,7 @@ public:
void set_lb_preselector(channel_t ch, preselector_path_t path, bool commit = true)
{
boost::lock_guard<boost::mutex> lock(_mutex);
- boost::uint32_t sw7val = 0, sw8val = 0;
+ uint32_t sw7val = 0, sw8val = 0;
switch (path) {
case PRESEL_PATH1: sw7val = 3; sw8val = 1; break;
case PRESEL_PATH2: sw7val = 2; sw8val = 0; break;
@@ -246,7 +246,7 @@ public:
void set_hb_preselector(channel_t ch, preselector_path_t path, bool commit = true)
{
boost::lock_guard<boost::mutex> lock(_mutex);
- boost::uint32_t sw9ch1val = 0, sw10ch1val = 0, sw9ch2val = 0, sw10ch2val = 0;
+ uint32_t sw9ch1val = 0, sw10ch1val = 0, sw9ch2val = 0, sw10ch2val = 0;
switch (path) {
case PRESEL_PATH1: sw9ch1val = 3; sw10ch1val = 0; sw9ch2val = 0; sw10ch2val = 3; break;
case PRESEL_PATH2: sw9ch1val = 1; sw10ch1val = 2; sw9ch2val = 1; sw10ch2val = 1; break;
@@ -266,7 +266,7 @@ public:
}
- void set_input_atten(channel_t ch, boost::uint8_t atten, bool commit = true)
+ void set_input_atten(channel_t ch, uint8_t atten, bool commit = true)
{
boost::lock_guard<boost::mutex> lock(_mutex);
if (ch == CH1 or ch == BOTH) {
@@ -278,7 +278,7 @@ public:
if (commit) _commit();
}
- void set_lb_atten(channel_t ch, boost::uint8_t atten, bool commit = true)
+ void set_lb_atten(channel_t ch, uint8_t atten, bool commit = true)
{
boost::lock_guard<boost::mutex> lock(_mutex);
if (ch == CH1 or ch == BOTH) {
@@ -290,7 +290,7 @@ public:
if (commit) _commit();
}
- void set_hb_atten(channel_t ch, boost::uint8_t atten, bool commit = true)
+ void set_hb_atten(channel_t ch, uint8_t atten, bool commit = true)
{
boost::lock_guard<boost::mutex> lock(_mutex);
if (ch == CH1 or ch == BOTH) {
@@ -502,9 +502,9 @@ private: //Functions
_cpld_regs->if0_reg2.flush();
}
- void _write_lo_spi(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs)
+ void _write_lo_spi(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs)
{
- BOOST_FOREACH(boost::uint32_t reg, regs) {
+ BOOST_FOREACH(uint32_t reg, regs) {
spi_config_t spi_config = spi_config_t(spi_config_t::EDGE_RISE);
spi_config.use_custom_divider = true;
spi_config.divider = 67;
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_ctrl.hpp b/host/lib/usrp/dboard/twinrx/twinrx_ctrl.hpp
index 521e27ae9..5537d00ab 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_ctrl.hpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_ctrl.hpp
@@ -69,11 +69,11 @@ public:
virtual void set_hb_preselector(channel_t ch, preselector_path_t path, bool commit = true) = 0;
- virtual void set_input_atten(channel_t ch, boost::uint8_t atten, bool commit = true) = 0;
+ virtual void set_input_atten(channel_t ch, uint8_t atten, bool commit = true) = 0;
- virtual void set_lb_atten(channel_t ch, boost::uint8_t atten, bool commit = true) = 0;
+ virtual void set_lb_atten(channel_t ch, uint8_t atten, bool commit = true) = 0;
- virtual void set_hb_atten(channel_t ch, boost::uint8_t atten, bool commit = true) = 0;
+ virtual void set_hb_atten(channel_t ch, uint8_t atten, bool commit = true) = 0;
virtual void set_lo1_source(channel_t ch, lo_source_t source, bool commit = true) = 0;
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp b/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp
index 9c83dbfa8..7b85137e1 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp
@@ -436,9 +436,9 @@ private:
experts::data_reader_t<twinrx_ctrl::preselector_path_t> _hb_presel;
experts::data_reader_t<twinrx_ctrl::antenna_mapping_t> _ant_mapping;
//Outputs
- experts::data_writer_t<boost::uint8_t> _input_atten;
- experts::data_writer_t<boost::uint8_t> _lb_atten;
- experts::data_writer_t<boost::uint8_t> _hb_atten;
+ experts::data_writer_t<uint8_t> _input_atten;
+ experts::data_writer_t<uint8_t> _lb_atten;
+ experts::data_writer_t<uint8_t> _hb_atten;
experts::data_writer_t<twinrx_ctrl::preamp_state_t> _preamp1;
experts::data_writer_t<bool> _preamp2;
};
@@ -499,21 +499,21 @@ private:
//Inputs
experts::data_reader_t<twinrx_ctrl::antenna_mapping_t> _ant_mapping;
- experts::data_reader_t<boost::uint8_t> _ch0_input_atten;
+ experts::data_reader_t<uint8_t> _ch0_input_atten;
experts::data_reader_t<twinrx_ctrl::preamp_state_t> _ch0_preamp1;
experts::data_reader_t<bool> _ch0_preamp2;
experts::data_reader_t<bool> _ch0_lb_preamp_presel;
- experts::data_reader_t<boost::uint8_t> _ch1_input_atten;
+ experts::data_reader_t<uint8_t> _ch1_input_atten;
experts::data_reader_t<twinrx_ctrl::preamp_state_t> _ch1_preamp1;
experts::data_reader_t<bool> _ch1_preamp2;
experts::data_reader_t<bool> _ch1_lb_preamp_presel;
//Outputs
- experts::data_writer_t<boost::uint8_t> _ant0_input_atten;
+ experts::data_writer_t<uint8_t> _ant0_input_atten;
experts::data_writer_t<twinrx_ctrl::preamp_state_t> _ant0_preamp1;
experts::data_writer_t<bool> _ant0_preamp2;
experts::data_writer_t<bool> _ant0_lb_preamp_presel;
- experts::data_writer_t<boost::uint8_t> _ant1_input_atten;
+ experts::data_writer_t<uint8_t> _ant1_input_atten;
experts::data_writer_t<twinrx_ctrl::preamp_state_t> _ant1_preamp1;
experts::data_writer_t<bool> _ant1_preamp2;
experts::data_writer_t<bool> _ant1_lb_preamp_presel;
@@ -623,9 +623,9 @@ private:
experts::data_reader_t<twinrx_ctrl::signal_path_t> signal_path;
experts::data_reader_t<twinrx_ctrl::preselector_path_t> lb_presel;
experts::data_reader_t<twinrx_ctrl::preselector_path_t> hb_presel;
- experts::data_reader_t<boost::uint8_t> input_atten;
- experts::data_reader_t<boost::uint8_t> lb_atten;
- experts::data_reader_t<boost::uint8_t> hb_atten;
+ experts::data_reader_t<uint8_t> input_atten;
+ experts::data_reader_t<uint8_t> lb_atten;
+ experts::data_reader_t<uint8_t> hb_atten;
experts::data_reader_t<twinrx_ctrl::lo_source_t> lo1_source;
experts::data_reader_t<twinrx_ctrl::lo_source_t> lo2_source;
experts::data_reader_t<double> lo1_freq_d;
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_gain_tables.hpp b/host/lib/usrp/dboard/twinrx/twinrx_gain_tables.hpp
index 0148965da..8ebab4243 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_gain_tables.hpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_gain_tables.hpp
@@ -19,7 +19,7 @@
#define INCLUDED_DBOARD_TWINRX_GAIN_TABLES_HPP
#include <uhd/config.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <uhd/types/ranges.hpp>
#include "twinrx_ctrl.hpp"
@@ -29,7 +29,7 @@ class twinrx_gain_config_t {
public:
twinrx_gain_config_t(
size_t index_, double sys_gain_,
- boost::uint8_t atten1_, boost::uint8_t atten2_,
+ uint8_t atten1_, uint8_t atten2_,
bool amp1_, bool amp2_
): index(index_), sys_gain(sys_gain_), atten1(atten1_), atten2(atten2_),
amp1(amp1_), amp2(amp2_)
@@ -49,8 +49,8 @@ public:
size_t index;
double sys_gain;
- boost::uint8_t atten1;
- boost::uint8_t atten2;
+ uint8_t atten1;
+ uint8_t atten2;
bool amp1;
bool amp2;
};
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_io.hpp b/host/lib/usrp/dboard/twinrx/twinrx_io.hpp
index 5d099e361..4fa5a22d5 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_io.hpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_io.hpp
@@ -26,13 +26,13 @@
namespace uhd { namespace usrp { namespace dboard { namespace twinrx {
-static const boost::uint32_t SET_ALL_BITS = 0xFFFFFFFF;
+static const uint32_t SET_ALL_BITS = 0xFFFFFFFF;
namespace cpld {
-static wb_iface::wb_addr_type addr(boost::uint8_t cpld_num, boost::uint8_t cpld_addr) {
+static wb_iface::wb_addr_type addr(uint8_t cpld_num, uint8_t cpld_addr) {
//Decode CPLD addressing for the following bitmap:
// {CPLD1_EN, CPLD2_EN, CPLD3_EN, CPLD4_EN, CPLD_ADDR[2:0]}
- boost::uint8_t addr = 0;
+ uint8_t addr = 0;
switch (cpld_num) {
case 1: addr = 0x8 << 3; break;
case 2: addr = 0x4 << 3; break;
@@ -43,8 +43,8 @@ static wb_iface::wb_addr_type addr(boost::uint8_t cpld_num, boost::uint8_t cpld_
return static_cast<wb_iface::wb_addr_type>(addr | (cpld_addr & 0x7));
}
-static boost::uint32_t get_reg(wb_iface::wb_addr_type addr) {
- return static_cast<boost::uint32_t>(addr) & 0x7;
+static uint32_t get_reg(wb_iface::wb_addr_type addr) {
+ return static_cast<uint32_t>(addr) & 0x7;
}
}
@@ -84,37 +84,37 @@ public:
_db_iface->set_gpio_ddr(dboard_iface::UNIT_BOTH, ~GPIO_OUTPUT_MASK, SET_ALL_BITS);
}
- void set_field(const uhd::soft_reg_field_t field, const boost::uint32_t value) {
+ void set_field(const uhd::soft_reg_field_t field, const uint32_t value) {
boost::lock_guard<boost::mutex> lock(_mutex);
using namespace soft_reg_field;
_db_iface->set_gpio_out(dboard_iface::UNIT_BOTH,
(value << shift(field)),
- mask<boost::uint32_t>(field));
+ mask<uint32_t>(field));
}
- boost::uint32_t get_field(const uhd::soft_reg_field_t field) {
+ uint32_t get_field(const uhd::soft_reg_field_t field) {
boost::lock_guard<boost::mutex> lock(_mutex);
using namespace soft_reg_field;
- return (_db_iface->read_gpio(dboard_iface::UNIT_BOTH) & mask<boost::uint32_t>(field)) >> shift(field);
+ return (_db_iface->read_gpio(dboard_iface::UNIT_BOTH) & mask<uint32_t>(field)) >> shift(field);
}
// CPLD register write-only interface
- void poke32(const wb_addr_type addr, const boost::uint32_t data) {
+ void poke32(const wb_addr_type addr, const uint32_t data) {
boost::lock_guard<boost::mutex> lock(_mutex);
using namespace soft_reg_field;
//Step 1: Write the reg offset and data to the GPIO bus and de-assert all enables
_db_iface->set_gpio_out(dboard_iface::UNIT_BOTH,
(cpld::get_reg(addr) << shift(CPLD_FULL_ADDR)) | (data << shift(CPLD_DATA)),
- mask<boost::uint32_t>(CPLD_FULL_ADDR)|mask<boost::uint32_t>(CPLD_DATA));
+ mask<uint32_t>(CPLD_FULL_ADDR)|mask<uint32_t>(CPLD_DATA));
//Sleep for 166ns to ensure that we don't toggle the enables too quickly
//The underlying sleep function rounds to microsecond precision.
_db_iface->sleep(boost::chrono::nanoseconds(166));
//Step 2: Write the reg offset and data, and assert the necessary enable
_db_iface->set_gpio_out(dboard_iface::UNIT_BOTH,
- (static_cast<boost::uint32_t>(addr) << shift(CPLD_FULL_ADDR)) | (data << shift(CPLD_DATA)),
- mask<boost::uint32_t>(CPLD_FULL_ADDR)|mask<boost::uint32_t>(CPLD_DATA));
+ (static_cast<uint32_t>(addr) << shift(CPLD_FULL_ADDR)) | (data << shift(CPLD_DATA)),
+ mask<uint32_t>(CPLD_FULL_ADDR)|mask<uint32_t>(CPLD_DATA));
}
// Timed command interface
@@ -128,8 +128,8 @@ public:
}
private: //Members/definitions
- static const boost::uint32_t GPIO_OUTPUT_MASK = 0xFC06FE03;
- static const boost::uint32_t GPIO_PINCTRL_MASK = 0x00000000;
+ static const uint32_t GPIO_OUTPUT_MASK = 0xFC06FE03;
+ static const uint32_t GPIO_PINCTRL_MASK = 0x00000000;
//Private GPIO fields
UHD_DEFINE_SOFT_REG_FIELD(CPLD_FULL_ADDR, /*width*/ 7, /*shift*/ 9); //GPIO[15:9]