diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2016-01-12 19:55:53 -0800 |
---|---|---|
committer | Ashish Chaudhari <ashish@ettus.com> | 2016-01-13 11:28:52 -0800 |
commit | c959dfa921dc26e6e54a425de7e06a4d746ff4fc (patch) | |
tree | 13fbeaa3d412e4941134c1704db5b78b9aaa15fc /host/lib/usrp/common | |
parent | 04147b2e53b83bb1428280f2eb5fa6e95ed7f5be (diff) | |
download | uhd-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')
-rw-r--r-- | host/lib/usrp/common/usrp3_fw_ctrl_iface.cpp | 15 | ||||
-rw-r--r-- | host/lib/usrp/common/usrp3_fw_ctrl_iface.hpp | 9 |
2 files changed, 15 insertions, 9 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); } } diff --git a/host/lib/usrp/common/usrp3_fw_ctrl_iface.hpp b/host/lib/usrp/common/usrp3_fw_ctrl_iface.hpp index 3617f3083..33286861b 100644 --- a/host/lib/usrp/common/usrp3_fw_ctrl_iface.hpp +++ b/host/lib/usrp/common/usrp3_fw_ctrl_iface.hpp @@ -30,7 +30,8 @@ class usrp3_fw_ctrl_iface : public uhd::wb_iface public: usrp3_fw_ctrl_iface( uhd::transport::udp_simple::sptr udp_xport, - boost::uint16_t product_id); + const boost::uint16_t product_id, + const bool verbose); virtual ~usrp3_fw_ctrl_iface(); // -- uhd::wb_iface -- @@ -40,7 +41,8 @@ public: static uhd::wb_iface::sptr make( uhd::transport::udp_simple::sptr udp_xport, - boost::uint16_t product_id); + const boost::uint16_t product_id, + const bool verbose = true); // -- uhd::wb_iface -- static std::vector<std::string> discover_devices( @@ -56,7 +58,8 @@ private: boost::uint32_t _peek32(const wb_addr_type addr); void _flush(void); - boost::uint16_t _product_id; + const boost::uint16_t _product_id; + const bool _verbose; uhd::transport::udp_simple::sptr _udp_xport; boost::uint32_t _seq_num; boost::mutex _mutex; |