aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/docs/usrp2.rst14
-rw-r--r--host/examples/test_async_messages.cpp2
-rw-r--r--host/lib/transport/libusb1_zero_copy.cpp2
-rw-r--r--host/lib/usrp/dboard_manager.cpp25
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp5
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp2
6 files changed, 40 insertions, 10 deletions
diff --git a/host/docs/usrp2.rst b/host/docs/usrp2.rst
index 4c95fb24c..72a919d1a 100644
--- a/host/docs/usrp2.rst
+++ b/host/docs/usrp2.rst
@@ -211,6 +211,20 @@ Hardware setup notes
------------------------------------------------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Front panel LEDs
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+The LEDs on the front panel can be useful in debugging hardware and software issues.
+The LEDs reveal the following about the state of the device:
+
+* **LED A:** transmitting
+* **LED B:** undocumented
+* **LED C:** receiving
+* **LED D:** firmware loaded
+* **LED E:** undocumented
+* **LED F:** FPGA loaded
+
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ref Clock - 10MHz
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Using an external 10MHz reference clock requires a signal level between
diff --git a/host/examples/test_async_messages.cpp b/host/examples/test_async_messages.cpp
index 4c9d18121..0a5c076ea 100644
--- a/host/examples/test_async_messages.cpp
+++ b/host/examples/test_async_messages.cpp
@@ -58,7 +58,7 @@ void test_no_async_message(uhd::usrp::single_usrp::sptr sdev){
" Got unexpected event code 0x%x.\n"
) % async_md.event_code << std::endl;
//clear the async messages
- while (dev->recv_async_msg(async_md, 0));
+ while (dev->recv_async_msg(async_md, 0)){};
}
else{
std::cout << boost::format(
diff --git a/host/lib/transport/libusb1_zero_copy.cpp b/host/lib/transport/libusb1_zero_copy.cpp
index d3888240b..b089d11e0 100644
--- a/host/lib/transport/libusb1_zero_copy.cpp
+++ b/host/lib/transport/libusb1_zero_copy.cpp
@@ -184,7 +184,7 @@ usb_endpoint::~usb_endpoint(void){
}
//collect canceled transfers (drain the queue)
- while (this->get_lut_with_wait() != NULL);
+ while (this->get_lut_with_wait() != NULL){};
//free all transfers
BOOST_FOREACH(libusb_transfer *lut, _all_luts){
diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp
index ab80875f5..181f843a0 100644
--- a/host/lib/usrp/dboard_manager.cpp
+++ b/host/lib/usrp/dboard_manager.cpp
@@ -18,6 +18,7 @@
#include "dboard_ctor_args.hpp"
#include <uhd/usrp/dboard_manager.hpp>
#include <uhd/usrp/subdev_props.hpp>
+#include <uhd/utils/warning.hpp>
#include <uhd/utils/static.hpp>
#include <uhd/utils/assert.hpp>
#include <uhd/types/dict.hpp>
@@ -176,10 +177,6 @@ static args_t get_dboard_args(
){
//special case, the none id was provided, use the following ids
if (dboard_id == dboard_id_t::none() or force_to_unknown){
- std::cerr << boost::format(
- "Warning: unknown dboard-id or dboard-id combination: %s\n"
- " -> defaulting to the unknown board type"
- ) % dboard_id.to_pp_string() << std::endl;
UHD_ASSERT_THROW(get_id_to_args_map().has_key(0xfff1));
UHD_ASSERT_THROW(get_id_to_args_map().has_key(0xfff0));
switch(unit){
@@ -191,6 +188,9 @@ static args_t get_dboard_args(
//verify that there is a registered constructor for this id
if (not get_id_to_args_map().has_key(dboard_id)){
+ uhd::print_warning(str(boost::format(
+ "Unknown dboard ID: %s.\n"
+ ) % dboard_id.to_pp_string()));
return get_dboard_args(unit, dboard_id, true);
}
@@ -214,12 +214,25 @@ dboard_manager_impl::dboard_manager_impl(
(get_xcvr_id_to_id_map()[tx_dboard_id] == rx_dboard_id)
);
+ //warn for invalid dboard id xcvr combinations
+ if (rx_dboard_is_xcvr != this_dboard_is_xcvr or tx_dboard_is_xcvr != this_dboard_is_xcvr){
+ uhd::print_warning(str(boost::format(
+ "Unknown transceiver board ID combination...\n"
+ "RX dboard ID: %s\n"
+ "TX dboard ID: %s\n"
+ ) % rx_dboard_id.to_pp_string() % tx_dboard_id.to_pp_string()));
+ }
+
//extract dboard constructor and settings (force to unknown for messed up xcvr status)
dboard_ctor_t rx_dboard_ctor; std::string rx_name; prop_names_t rx_subdevs;
- boost::tie(rx_dboard_ctor, rx_name, rx_subdevs) = get_dboard_args(dboard_iface::UNIT_RX, rx_dboard_id, rx_dboard_is_xcvr != this_dboard_is_xcvr);
+ boost::tie(rx_dboard_ctor, rx_name, rx_subdevs) = get_dboard_args(
+ dboard_iface::UNIT_RX, rx_dboard_id, rx_dboard_is_xcvr != this_dboard_is_xcvr
+ );
dboard_ctor_t tx_dboard_ctor; std::string tx_name; prop_names_t tx_subdevs;
- boost::tie(tx_dboard_ctor, tx_name, tx_subdevs) = get_dboard_args(dboard_iface::UNIT_TX, tx_dboard_id, tx_dboard_is_xcvr != this_dboard_is_xcvr);
+ boost::tie(tx_dboard_ctor, tx_name, tx_subdevs) = get_dboard_args(
+ dboard_iface::UNIT_TX, tx_dboard_id, tx_dboard_is_xcvr != this_dboard_is_xcvr
+ );
//initialize the gpio pins before creating subdevs
set_nice_dboard_if();
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index a56649305..b4c23bf12 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -95,7 +95,10 @@ static device_addrs_t usrp1_find(const device_addr_t &hint)
device_addr_t new_addr;
new_addr["type"] = "usrp1";
new_addr["serial"] = handle->get_serial();
- usrp1_addrs.push_back(new_addr);
+ //this is a found usrp1 when a hint serial is not specified or it matches
+ if (not hint.has_key("serial") or hint["serial"] == new_addr["serial"]){
+ usrp1_addrs.push_back(new_addr);
+ }
}
return usrp1_addrs;
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp
index 91a1b2344..65411801d 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -150,7 +150,7 @@ void usrp2_impl::io_init(void){
std::memcpy(send_buff->cast<void*>(), &data, sizeof(data));
send_buff->commit(sizeof(data));
//drain the recv buffers (may have junk)
- while (data_transport->get_recv_buff().get());
+ while (data_transport->get_recv_buff().get()){};
}
//the number of recv frames is the number for the first transport