diff options
author | Josh Blum <josh@joshknows.com> | 2011-05-04 19:53:01 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-05-04 19:53:01 -0700 |
commit | 09be0518cee887878f3b070adea25eccc4c06e60 (patch) | |
tree | d25df33a4860116d51fd5ac49753739397948353 /host/lib/usrp/usrp1/mboard_impl.cpp | |
parent | 805da3ef3d5b04dfa39587c531a3415b09d2ea5b (diff) | |
download | uhd-09be0518cee887878f3b070adea25eccc4c06e60.tar.gz uhd-09be0518cee887878f3b070adea25eccc4c06e60.tar.bz2 uhd-09be0518cee887878f3b070adea25eccc4c06e60.zip |
uhd: removed more iostream stuff from usrp* implementations
Diffstat (limited to 'host/lib/usrp/usrp1/mboard_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp1/mboard_impl.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/host/lib/usrp/usrp1/mboard_impl.cpp b/host/lib/usrp/usrp1/mboard_impl.cpp index aa9ce244b..cd04e7351 100644 --- a/host/lib/usrp/usrp1/mboard_impl.cpp +++ b/host/lib/usrp/usrp1/mboard_impl.cpp @@ -20,6 +20,8 @@ #include "fpga_regs_standard.h" #include "fpga_regs_common.h" #include "usrp_i2c_addr.h" +#include <uhd/utils/msg.hpp> +#include <uhd/utils/log.hpp> #include <uhd/usrp/misc_utils.hpp> #include <uhd/usrp/mboard_props.hpp> #include <uhd/usrp/dboard_props.hpp> @@ -31,13 +33,10 @@ #include <boost/foreach.hpp> #include <boost/bind.hpp> #include <boost/thread/thread.hpp> -#include <iostream> using namespace uhd; using namespace uhd::usrp; -static const bool usrp1_mboard_verbose = false; - /*********************************************************************** * Calculate the RX mux value: * The I and Q mux values are intentionally reversed to flip I and Q @@ -231,13 +230,13 @@ void usrp1_impl::mboard_init(void) // Set default for TX format to 16-bit I&Q _iface->poke32(FR_TX_FORMAT, 0x00000000); - if (usrp1_mboard_verbose){ - std::cout << "USRP1 Capabilities" << std::endl; - std::cout << " number of duc's: " << get_num_ddcs() << std::endl; - std::cout << " number of ddc's: " << get_num_ducs() << std::endl; - std::cout << " rx halfband: " << has_rx_halfband() << std::endl; - std::cout << " tx halfband: " << has_tx_halfband() << std::endl; - } + UHD_LOG + << "USRP1 Capabilities" << std::endl + << " number of duc's: " << get_num_ddcs() << std::endl + << " number of ddc's: " << get_num_ducs() << std::endl + << " rx halfband: " << has_rx_halfband() << std::endl + << " tx halfband: " << has_tx_halfband() << std::endl + ; } /*********************************************************************** @@ -331,7 +330,7 @@ void usrp1_impl::mboard_set(const wax::obj &key, const wax::obj &val) if(key.type() == typeid(std::string)) { if(key.as<std::string>() == "load_eeprom") { std::string usrp1_eeprom_image = val.as<std::string>(); - std::cout << "USRP1 EEPROM image: " << usrp1_eeprom_image << std::endl; + UHD_MSG(status) << "USRP1 EEPROM image: " << usrp1_eeprom_image << std::endl; _ctrl_transport->usrp_load_eeprom(val.as<std::string>()); } return; @@ -378,10 +377,11 @@ void usrp1_impl::mboard_set(const wax::obj &key, const wax::obj &val) return; case MBOARD_PROP_CLOCK_RATE: - std::cerr << "Helpful message:" << std::endl; - std::cerr << " I see that you are setting the master clock rate from the API." << std::endl; - std::cerr << " You may find it more convenient to burn this setting into the EEPROM." << std::endl; - std::cerr << " See the application notes for USRP1 for further instructions." << std::endl; + UHD_MSG(warning) + << "I see that you are setting the master clock rate from the API.\n" + << "You may find it more convenient to burn this setting into the EEPROM.\n" + << "See the application notes for USRP1 for further instructions.\n" + ; _clock_ctrl->set_master_clock_freq(val.as<double>()); return; |