aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/common/usrp3_fw_ctrl_iface.cpp
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2016-01-12 19:55:53 -0800
committerAshish Chaudhari <ashish@ettus.com>2016-01-13 11:28:52 -0800
commitc959dfa921dc26e6e54a425de7e06a4d746ff4fc (patch)
tree13fbeaa3d412e4941134c1704db5b78b9aaa15fc /host/lib/usrp/common/usrp3_fw_ctrl_iface.cpp
parent04147b2e53b83bb1428280f2eb5fa6e95ed7f5be (diff)
downloaduhd-c959dfa921dc26e6e54a425de7e06a4d746ff4fc.tar.gz
uhd-c959dfa921dc26e6e54a425de7e06a4d746ff4fc.tar.bz2
uhd-c959dfa921dc26e6e54a425de7e06a4d746ff4fc.zip
n230: Multiple usability improvements
- Improved FW/FPGA compat mismatch error messages - Added power-cycle message to loader - Disabled "SW too new for HW" version check - Added retry mechanism in n230_find to allow for ARP updates
Diffstat (limited to 'host/lib/usrp/common/usrp3_fw_ctrl_iface.cpp')
-rw-r--r--host/lib/usrp/common/usrp3_fw_ctrl_iface.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/host/lib/usrp/common/usrp3_fw_ctrl_iface.cpp b/host/lib/usrp/common/usrp3_fw_ctrl_iface.cpp
index aefd84882..ef541e37f 100644
--- a/host/lib/usrp/common/usrp3_fw_ctrl_iface.cpp
+++ b/host/lib/usrp/common/usrp3_fw_ctrl_iface.cpp
@@ -32,9 +32,10 @@ namespace uhd { namespace usrp { namespace usrp3 {
//----------------------------------------------------------
uhd::wb_iface::sptr usrp3_fw_ctrl_iface::make(
uhd::transport::udp_simple::sptr udp_xport,
- boost::uint16_t product_id)
+ const boost::uint16_t product_id,
+ const bool verbose)
{
- return wb_iface::sptr(new usrp3_fw_ctrl_iface(udp_xport, product_id));
+ return wb_iface::sptr(new usrp3_fw_ctrl_iface(udp_xport, product_id, verbose));
}
//----------------------------------------------------------
@@ -43,8 +44,10 @@ uhd::wb_iface::sptr usrp3_fw_ctrl_iface::make(
usrp3_fw_ctrl_iface::usrp3_fw_ctrl_iface(
uhd::transport::udp_simple::sptr udp_xport,
- boost::uint16_t product_id) :
- _product_id(product_id), _udp_xport(udp_xport), _seq_num(0)
+ const boost::uint16_t product_id,
+ const bool verbose) :
+ _product_id(product_id), _verbose(verbose), _udp_xport(udp_xport),
+ _seq_num(0)
{
flush();
peek32(0);
@@ -72,7 +75,7 @@ void usrp3_fw_ctrl_iface::poke32(const wb_addr_type addr, const boost::uint32_t
} catch(const std::exception &ex) {
const std::string error_msg = str(boost::format(
"udp fw poke32 failure #%u\n%s") % i % ex.what());
- UHD_MSG(warning) << error_msg << std::endl;
+ if (_verbose) UHD_MSG(warning) << error_msg << std::endl;
if (i == NUM_RETRIES) throw uhd::io_error(error_msg);
}
}
@@ -88,7 +91,7 @@ boost::uint32_t usrp3_fw_ctrl_iface::peek32(const wb_addr_type addr)
} catch(const std::exception &ex) {
const std::string error_msg = str(boost::format(
"udp fw peek32 failure #%u\n%s") % i % ex.what());
- UHD_MSG(warning) << error_msg << std::endl;
+ if (_verbose) UHD_MSG(warning) << error_msg << std::endl;
if (i == NUM_RETRIES) throw uhd::io_error(error_msg);
}
}