diff options
author | Martin Braun <martin.braun@ettus.com> | 2015-07-01 07:24:42 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-07-01 07:24:42 -0700 |
commit | 984575c9f1ca18c3d97ba730e20bdbe7b7614c1e (patch) | |
tree | 31e1860027c6d4ff8c0745b012c35d5adc141c81 /host/lib/usrp | |
parent | 41812aa2f3ec7bd112926210cfff8212037efa4d (diff) | |
parent | 1c60149c94472372bef2578595776930fae0b91d (diff) | |
download | uhd-984575c9f1ca18c3d97ba730e20bdbe7b7614c1e.tar.gz uhd-984575c9f1ca18c3d97ba730e20bdbe7b7614c1e.tar.bz2 uhd-984575c9f1ca18c3d97ba730e20bdbe7b7614c1e.zip |
Merge branch 'maint'
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index b4fa2c1be..abddd1747 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -825,7 +825,6 @@ void b200_impl::register_loopback_self_test(wb_iface::sptr iface) void b200_impl::codec_loopback_self_test(wb_iface::sptr iface) { - bool test_fail = false; UHD_MSG(status) << "Performing CODEC loopback test... " << std::flush; size_t hash = size_t(time(NULL)); for (size_t i = 0; i < 100; i++) @@ -837,11 +836,13 @@ void b200_impl::codec_loopback_self_test(wb_iface::sptr iface) const boost::uint64_t rb_word64 = iface->peek64(RB64_CODEC_READBACK); const boost::uint32_t rb_tx = boost::uint32_t(rb_word64 >> 32); const boost::uint32_t rb_rx = boost::uint32_t(rb_word64 & 0xffffffff); - test_fail = word32 != rb_tx or word32 != rb_rx; - if (test_fail) break; //exit loop on any failure + bool test_fail = word32 != rb_tx or word32 != rb_rx; + if (test_fail) { + UHD_MSG(status) << "fail" << std::endl; + throw uhd::runtime_error("CODEC loopback test failed."); + } } - UHD_MSG(status) << ((test_fail)? "fail" : "pass") << std::endl; - + UHD_MSG(status) << "pass" << std::endl; /* Zero out the idle data. */ iface->poke32(TOREG(SR_CODEC_IDLE), 0); } |