diff options
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/mboard_eeprom.cpp | 17 | ||||
-rw-r--r-- | host/lib/usrp/usrp1/CMakeLists.txt | 2 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_impl.cpp | 8 |
3 files changed, 9 insertions, 18 deletions
diff --git a/host/lib/usrp/mboard_eeprom.cpp b/host/lib/usrp/mboard_eeprom.cpp index 89e83bd56..81dc6f194 100644 --- a/host/lib/usrp/mboard_eeprom.cpp +++ b/host/lib/usrp/mboard_eeprom.cpp @@ -132,20 +132,13 @@ static void store_nxxx(const mboard_eeprom_t &mb_eeprom, i2c_iface &iface){ * Implementation of BXXX load/store **********************************************************************/ static const boost::uint8_t BXXX_EEPROM_ADDR = 0x50; -static const size_t USB_SERIAL_LEN = 16; static const uhd::dict<std::string, boost::uint8_t> USRP_BXXX_OFFSETS = boost::assign::map_list_of - ("usb-serial", 0xf8) - ("serial", 0xf8 + USB_SERIAL_LEN) - ("name", 0xf8 + USB_SERIAL_LEN + SERIAL_LEN) + ("serial", 0xf8) + ("name", 0xf8 + SERIAL_LEN) ; static void load_bxxx(mboard_eeprom_t &mb_eeprom, i2c_iface &iface){ - //extract the usb serial - mb_eeprom["usb-serial"] = bytes_to_string(iface.read_eeprom( - BXXX_EEPROM_ADDR, USRP_BXXX_OFFSETS["usb-serial"], USB_SERIAL_LEN - )); - //extract the serial mb_eeprom["serial"] = bytes_to_string(iface.read_eeprom( BXXX_EEPROM_ADDR, USRP_BXXX_OFFSETS["serial"], SERIAL_LEN @@ -158,12 +151,6 @@ static void load_bxxx(mboard_eeprom_t &mb_eeprom, i2c_iface &iface){ } static void store_bxxx(const mboard_eeprom_t &mb_eeprom, i2c_iface &iface){ - //store the usb serial - iface.write_eeprom( - BXXX_EEPROM_ADDR, USRP_BXXX_OFFSETS["usb-serial"], - string_to_bytes(mb_eeprom["usb-serial"], USB_SERIAL_LEN) - ); - //store the serial iface.write_eeprom( BXXX_EEPROM_ADDR, USRP_BXXX_OFFSETS["serial"], diff --git a/host/lib/usrp/usrp1/CMakeLists.txt b/host/lib/usrp/usrp1/CMakeLists.txt index 67487f99e..022015231 100644 --- a/host/lib/usrp/usrp1/CMakeLists.txt +++ b/host/lib/usrp/usrp1/CMakeLists.txt @@ -40,7 +40,7 @@ ENDIF(ENABLE_USRP1 AND NOT HAVE_USB_SUPPORT) IF(ENABLE_USRP1) MESSAGE(STATUS " Building USRP1 support.") - INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/../firmware/fx2/include) + INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/../firmware/fx2/common) LIBUHD_APPEND_SOURCES( ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/clock_ctrl.cpp diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index d94a8606e..6625cf3e7 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -21,6 +21,7 @@ #include <uhd/usrp/device_props.hpp> #include <uhd/utils/assert.hpp> #include <uhd/utils/static.hpp> +#include <uhd/utils/warning.hpp> #include <uhd/utils/algorithm.hpp> #include <boost/assign/list_of.hpp> #include <boost/format.hpp> @@ -122,8 +123,11 @@ static uhd::device_addrs_t usrp2_find(const device_addr_t &hint){ usrp2_addrs.push_back(new_addr); } } - catch(const std::exception &){ - usrp2_addrs.push_back(new_addr); + catch(const std::exception &e){ + uhd::warning::post( + std::string("Ignoring discovered device\n") + + e.what() + ); } //dont break here, it will exit the while loop //just continue on to the next loop iteration |