diff options
author | Josh Blum <josh@joshknows.com> | 2011-05-04 12:22:21 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-05-04 14:34:49 -0700 |
commit | 0de4f165e937168693ac758239d569a2ace60325 (patch) | |
tree | 3443b1baa0cbfef13f3e881d87a25e0b58d867dd /host/lib/usrp/dboard/db_xcvr2450.cpp | |
parent | 8426a72bd66850ed1311ee8957dc5b7e4d98e301 (diff) | |
download | uhd-0de4f165e937168693ac758239d569a2ace60325.tar.gz uhd-0de4f165e937168693ac758239d569a2ace60325.tar.bz2 uhd-0de4f165e937168693ac758239d569a2ace60325.zip |
usrp: replaced conditional dboard debug prints w/ UHD_LOGV(often)
Diffstat (limited to 'host/lib/usrp/dboard/db_xcvr2450.cpp')
-rw-r--r-- | host/lib/usrp/dboard/db_xcvr2450.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp index 45f600569..4bda43251 100644 --- a/host/lib/usrp/dboard/db_xcvr2450.cpp +++ b/host/lib/usrp/dboard/db_xcvr2450.cpp @@ -48,6 +48,7 @@ #define RX_DIS_RXIO 0 #include "max2829_regs.hpp" +#include <uhd/utils/log.hpp> #include <uhd/utils/static.hpp> #include <uhd/utils/assert_has.hpp> #include <uhd/utils/algorithm.hpp> @@ -71,8 +72,6 @@ using namespace boost::assign; /*********************************************************************** * The XCVR 2450 constants **********************************************************************/ -static const bool xcvr2450_debug = false; - static const freq_range_t xcvr_freq_range = list_of (range_t(2.4e9, 2.5e9)) (range_t(4.9e9, 6.0e9)) @@ -127,7 +126,7 @@ private: void spi_reset(void); void send_reg(boost::uint8_t addr){ boost::uint32_t value = _max2829_regs.get_reg(addr); - if(xcvr2450_debug) std::cerr << boost::format( + UHD_LOGV(often) << boost::format( "XCVR2450: send reg 0x%02x, value 0x%05x" ) % int(addr) % value << std::endl; this->get_iface()->write_spi( @@ -302,7 +301,7 @@ void xcvr2450::set_lo_freq(double target_freq){ double N = double(intdiv) + double(fracdiv)/double(1 << 16); _lo_freq = (N*ref_freq)/(scaler*R*_ad9515div); - if (xcvr2450_debug) std::cerr + UHD_LOGV(often) << 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) @@ -312,10 +311,10 @@ void xcvr2450::set_lo_freq(double target_freq){ //high-high band or low-high band? if(_lo_freq > (5.35e9 + 5.47e9)/2.0){ - if (xcvr2450_debug) std::cerr << "XCVR2450 tune: Using high-high band" << std::endl; + UHD_LOGV(often) << "XCVR2450 tune: Using high-high band" << std::endl; _max2829_regs.band_select_802_11a = max2829_regs_t::BAND_SELECT_802_11A_5_47GHZ_TO_5_875GHZ; }else{ - if (xcvr2450_debug) std::cerr << "XCVR2450 tune: Using low-high band" << std::endl; + UHD_LOGV(often) << "XCVR2450 tune: Using low-high band" << std::endl; _max2829_regs.band_select_802_11a = max2829_regs_t::BAND_SELECT_802_11A_4_9GHZ_TO_5_35GHZ; } @@ -547,7 +546,7 @@ void xcvr2450::set_rx_bandwidth(double bandwidth){ //update register send_reg(0x7); - if (xcvr2450_debug) std::cerr << boost::format( + UHD_LOGV(often) << 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; } @@ -562,7 +561,7 @@ void xcvr2450::set_tx_bandwidth(double bandwidth){ //update register send_reg(0x7); - if (xcvr2450_debug) std::cerr << boost::format( + UHD_LOGV(often) << boost::format( "XCVR2450 TX Bandwidth (lp_fc): %f Hz, coarse reg: %d" ) % _tx_bandwidth % (int(_max2829_regs.tx_lpf_coarse_adj)) << std::endl; } |