aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/db_xcvr2450.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/dboard/db_xcvr2450.cpp')
-rw-r--r--host/lib/usrp/dboard/db_xcvr2450.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp
index ee69dbdad..fe6eca07b 100644
--- a/host/lib/usrp/dboard/db_xcvr2450.cpp
+++ b/host/lib/usrp/dboard/db_xcvr2450.cpp
@@ -135,9 +135,9 @@ private:
void spi_reset(void);
void send_reg(uint8_t addr){
uint32_t value = _max2829_regs.get_reg(addr);
- UHD_LOGV(often) << boost::format(
+ UHD_LOGGER_TRACE("XCVR2450") << boost::format(
"XCVR2450: send reg 0x%02x, value 0x%05x"
- ) % int(addr) % value << std::endl;
+ ) % int(addr) % value ;
this->get_iface()->write_spi(
dboard_iface::UNIT_RX,
spi_config_t::EDGE_RISE,
@@ -234,7 +234,7 @@ xcvr2450::xcvr2450(ctor_args_t args) : xcvr_dboard_base(args){
.set_publisher(boost::bind(&xcvr2450::get_locked, this));
this->get_rx_subtree()->create<sensor_value_t>("sensors/rssi")
.set_publisher(boost::bind(&xcvr2450::get_rssi, this));
- BOOST_FOREACH(const std::string &name, xcvr_rx_gain_ranges.keys()){
+ for(const std::string &name: xcvr_rx_gain_ranges.keys()){
this->get_rx_subtree()->create<double>("gains/"+name+"/value")
.set_coercer(boost::bind(&xcvr2450::set_rx_gain, this, _1, name))
.set(xcvr_rx_gain_ranges[name].start());
@@ -270,7 +270,7 @@ xcvr2450::xcvr2450(ctor_args_t args) : xcvr_dboard_base(args){
.set("XCVR2450 TX");
this->get_tx_subtree()->create<sensor_value_t>("sensors/lo_locked")
.set_publisher(boost::bind(&xcvr2450::get_locked, this));
- BOOST_FOREACH(const std::string &name, xcvr_tx_gain_ranges.keys()){
+ for(const std::string &name: xcvr_tx_gain_ranges.keys()){
this->get_tx_subtree()->create<double>("gains/"+name+"/value")
.set_coercer(boost::bind(&xcvr2450::set_tx_gain, this, _1, name))
.set(xcvr_tx_gain_ranges[name].start());
@@ -391,20 +391,20 @@ double xcvr2450::set_lo_freq_core(double target_freq){
double N = double(intdiv) + double(fracdiv)/double(1 << 16);
_lo_freq = (N*ref_freq)/(scaler*R*_ad9515div);
- UHD_LOGV(often)
+ UHD_LOGGER_TRACE("XCVR2450")
<< boost::format("XCVR2450 tune:\n")
<< boost::format(" R=%d, N=%f, ad9515=%d, scaler=%f\n") % R % N % _ad9515div % scaler
<< boost::format(" Ref Freq=%fMHz\n") % (ref_freq/1e6)
<< boost::format(" Target Freq=%fMHz\n") % (target_freq/1e6)
<< boost::format(" Actual Freq=%fMHz\n") % (_lo_freq/1e6)
- << std::endl;
+ ;
//high-high band or low-high band?
if(_lo_freq > (5.35e9 + 5.47e9)/2.0){
- UHD_LOGV(often) << "XCVR2450 tune: Using high-high band" << std::endl;
+ UHD_LOGGER_TRACE("XCVR2450") << "XCVR2450 tune: Using high-high band" ;
_max2829_regs.band_select_802_11a = max2829_regs_t::BAND_SELECT_802_11A_5_47GHZ_TO_5_875GHZ;
}else{
- UHD_LOGV(often) << "XCVR2450 tune: Using low-high band" << std::endl;
+ UHD_LOGGER_TRACE("XCVR2450") << "XCVR2450 tune: Using low-high band" ;
_max2829_regs.band_select_802_11a = max2829_regs_t::BAND_SELECT_802_11A_4_9GHZ_TO_5_35GHZ;
}
@@ -655,9 +655,9 @@ double xcvr2450::set_rx_bandwidth(double bandwidth){
//update register
send_reg(0x7);
- UHD_LOGV(often) << boost::format(
+ UHD_LOGGER_TRACE("XCVR2450") << boost::format(
"XCVR2450 RX Bandwidth (lp_fc): %f Hz, coarse reg: %d, fine reg: %d"
- ) % _rx_bandwidth % (int(_max2829_regs.rx_lpf_coarse_adj)) % (int(_max2829_regs.rx_lpf_fine_adj)) << std::endl;
+ ) % _rx_bandwidth % (int(_max2829_regs.rx_lpf_coarse_adj)) % (int(_max2829_regs.rx_lpf_fine_adj)) ;
return 2.0*_rx_bandwidth;
}
@@ -675,9 +675,9 @@ double xcvr2450::set_tx_bandwidth(double bandwidth){
//update register
send_reg(0x7);
- UHD_LOGV(often) << boost::format(
+ UHD_LOGGER_TRACE("XCVR2450") << boost::format(
"XCVR2450 TX Bandwidth (lp_fc): %f Hz, coarse reg: %d"
- ) % _tx_bandwidth % (int(_max2829_regs.tx_lpf_coarse_adj)) << std::endl;
+ ) % _tx_bandwidth % (int(_max2829_regs.tx_lpf_coarse_adj)) ;
//convert lowpass back to complex bandpass bandwidth
return 2.0*_tx_bandwidth;