diff options
Diffstat (limited to 'host/lib/usrp/b100')
-rw-r--r-- | host/lib/usrp/b100/b100_impl.cpp | 14 | ||||
-rw-r--r-- | host/lib/usrp/b100/clock_ctrl.cpp | 20 | ||||
-rw-r--r-- | host/lib/usrp/b100/codec_ctrl.cpp | 6 | ||||
-rw-r--r-- | host/lib/usrp/b100/io_impl.cpp | 2 | ||||
-rw-r--r-- | host/lib/usrp/b100/usb_zero_copy_wrapper.cpp | 2 |
5 files changed, 22 insertions, 22 deletions
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp index d87d0890d..25f99e85e 100644 --- a/host/lib/usrp/b100/b100_impl.cpp +++ b/host/lib/usrp/b100/b100_impl.cpp @@ -19,7 +19,7 @@ #include "b100_impl.hpp" #include "b100_regs.hpp" #include <uhd/transport/usb_control.hpp> -#include <uhd/utils/msg.hpp> +#include <uhd/utils/log.hpp> #include <uhd/utils/cast.hpp> #include <uhd/exception.hpp> #include <uhd/utils/static.hpp> @@ -80,10 +80,10 @@ static device_addrs_t b100_find(const device_addr_t &hint) b100_fw_image = find_image_path(hint.get("fw", B100_FW_FILE_NAME)); } catch(...){ - UHD_MSG(warning) << boost::format("Could not locate B100 firmware. %s\n") % print_utility_error("uhd_images_downloader.py"); + UHD_LOGGER_WARNING("B100") << boost::format("Could not locate B100 firmware. %s\n") % print_utility_error("uhd_images_downloader.py"); return b100_addrs; } - UHD_LOG << "the firmware image: " << b100_fw_image << std::endl; + UHD_LOGGER_DEBUG("B100") << "the firmware image: " << b100_fw_image ; usb_control::sptr control; try{control = usb_control::make(handle, 0);} @@ -202,9 +202,9 @@ b100_impl::b100_impl(const device_addr_t &device_addr){ //try reset once in the case of failure catch(const uhd::exception &ex){ if (initialization_count > 1) throw; - UHD_MSG(warning) << + UHD_LOGGER_WARNING("B100") << "The control endpoint was left in a bad state.\n" - "Attempting endpoint re-enumeration...\n" << ex.what() << std::endl; + "Attempting endpoint re-enumeration...\n" << ex.what() ; _fifo_ctrl.reset(); _ctrl_transport.reset(); _fx2_ctrl->usrp_fx2_reset(); @@ -230,9 +230,9 @@ b100_impl::b100_impl(const device_addr_t &device_addr){ //try reset once in the case of failure catch(const uhd::exception &){ if (initialization_count > 1) throw; - UHD_MSG(warning) << + UHD_LOGGER_WARNING("B100") << "The control endpoint was left in a bad state.\n" - "Attempting endpoint re-enumeration...\n" << std::endl; + "Attempting endpoint re-enumeration...\n" ; _fifo_ctrl.reset(); _ctrl_transport.reset(); _fx2_ctrl->usrp_fx2_reset(); diff --git a/host/lib/usrp/b100/clock_ctrl.cpp b/host/lib/usrp/b100/clock_ctrl.cpp index 99ad6a052..cc20e4a0f 100644 --- a/host/lib/usrp/b100/clock_ctrl.cpp +++ b/host/lib/usrp/b100/clock_ctrl.cpp @@ -18,7 +18,7 @@ #include "clock_ctrl.hpp" #include "ad9522_regs.hpp" #include <uhd/utils/log.hpp> -#include <uhd/utils/msg.hpp> + #include <uhd/exception.hpp> #include <uhd/utils/assert_has.hpp> #include <uhd/utils/safe_call.hpp> @@ -148,11 +148,11 @@ static clock_settings_type get_clock_settings(double rate){ cs.chan_divider /= cs.vco_divider; } - UHD_LOGV(always) - << "gcd " << gcd << std::endl - << "X " << X << std::endl - << "Y " << Y << std::endl - << cs.to_pp_string() << std::endl + UHD_LOGGER_DEBUG("B100") + << "gcd: " << gcd + << " X: " << X + << " Y: " << Y + << cs.to_pp_string() ; //filter limits on the counters @@ -166,7 +166,7 @@ static clock_settings_type get_clock_settings(double rate){ if (cs.get_vco_rate() < 1400e6 + vco_bound_pad) continue; if (cs.get_out_rate() != rate) continue; - UHD_MSG(status) << "USRP-B100 clock control: " << i << std::endl << cs.to_pp_string() << std::endl; + UHD_LOGGER_INFO("B100") << "USRP-B100 clock control: " << i << cs.to_pp_string() ; return cs; } } @@ -465,7 +465,7 @@ private: 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; + UHD_LOGGER_DEBUG("B100") << "clock control write reg: " << std::hex << reg ; byte_vector_t buf; buf.push_back(uint8_t(reg >> 16)); buf.push_back(uint8_t(reg >> 8)); @@ -501,7 +501,7 @@ private: _ad9522_regs.set_reg(addr, reg); if (_ad9522_regs.vco_calibration_finished) goto wait_for_ld; } - UHD_MSG(error) << "USRP-B100 clock control: VCO calibration timeout" << std::endl; + UHD_LOGGER_ERROR("B100") << "USRP-B100 clock control: VCO calibration timeout"; wait_for_ld: //wait for digital lock detect: for (size_t ms10 = 0; ms10 < 100; ms10++){ @@ -510,7 +510,7 @@ private: _ad9522_regs.set_reg(addr, reg); if (_ad9522_regs.digital_lock_detect) return; } - UHD_MSG(error) << "USRP-B100 clock control: lock detection timeout" << std::endl; + UHD_LOGGER_ERROR("B100") << "USRP-B100 clock control: lock detection timeout"; } void soft_sync(void){ diff --git a/host/lib/usrp/b100/codec_ctrl.cpp b/host/lib/usrp/b100/codec_ctrl.cpp index e78608beb..26ee877dc 100644 --- a/host/lib/usrp/b100/codec_ctrl.cpp +++ b/host/lib/usrp/b100/codec_ctrl.cpp @@ -259,7 +259,7 @@ void b100_codec_ctrl_impl::write_aux_dac(aux_dac_t which, double volts){ **********************************************************************/ 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; + UHD_LOGGER_DEBUG("B100") << "codec control write reg: " << std::hex << reg ; _iface->transact_spi( B100_SPI_SS_AD9862, spi_config_t::EDGE_RISE, @@ -269,13 +269,13 @@ void b100_codec_ctrl_impl::send_reg(uint8_t 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; + UHD_LOGGER_DEBUG("B100") << "codec control read reg: " << std::hex << reg ; 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 << uint16_t(ret & 0xFF) << std::endl; + UHD_LOGGER_DEBUG("B100") << "codec control read ret: " << std::hex << uint16_t(ret & 0xFF) ; _ad9862_regs.set_reg(addr, uint8_t(ret&0xff)); } diff --git a/host/lib/usrp/b100/io_impl.cpp b/host/lib/usrp/b100/io_impl.cpp index 09973491c..7cccc7752 100644 --- a/host/lib/usrp/b100/io_impl.cpp +++ b/host/lib/usrp/b100/io_impl.cpp @@ -23,7 +23,7 @@ #include <boost/format.hpp> #include <boost/bind.hpp> #include <boost/thread.hpp> -#include <uhd/utils/msg.hpp> + #include <uhd/utils/log.hpp> #include <boost/make_shared.hpp> diff --git a/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp b/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp index 568b7add9..ea3e9f87e 100644 --- a/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp +++ b/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp @@ -18,7 +18,7 @@ #include <uhd/transport/usb_zero_copy.hpp> #include <uhd/transport/buffer_pool.hpp> #include <uhd/utils/byteswap.hpp> -#include <uhd/utils/msg.hpp> +#include <uhd/utils/log.hpp> #include <uhd/utils/tasks.hpp> #include <uhd/utils/atomic.hpp> #include <boost/make_shared.hpp> |