From ec8005e3d5d1a80f89f5cfbaa8e1cdadf2d14db6 Mon Sep 17 00:00:00 2001 From: Thomas Tsou Date: Fri, 27 Aug 2010 16:20:15 -0700 Subject: usrp1: Wait for USB device renumeration only when necessary Waiting for FX2 renumeration is only needed after a firmware load so move it out of the main device discovery loop and into the firmware load itself. --- host/lib/usrp/usrp1/usrp1_ctrl.cpp | 4 ++++ host/lib/usrp/usrp1/usrp1_impl.cpp | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/usrp1/usrp1_ctrl.cpp b/host/lib/usrp/usrp1/usrp1_ctrl.cpp index b7c6bdaf6..98226b738 100644 --- a/host/lib/usrp/usrp1/usrp1_ctrl.cpp +++ b/host/lib/usrp/usrp1/usrp1_ctrl.cpp @@ -19,6 +19,7 @@ #include "usrp_commands.h" #include #include +#include #include #include #include @@ -209,6 +210,9 @@ public: usrp_set_firmware_hash(hash); file.close(); + //wait for things to settle + boost::this_thread::sleep(boost::posix_time::milliseconds(1000)); + return USRP_FIRMWARE_LOAD_SUCCESS; } //type anything else is unhandled diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp index d37eec566..3c3306525 100644 --- a/host/lib/usrp/usrp1/usrp1_impl.cpp +++ b/host/lib/usrp/usrp1/usrp1_impl.cpp @@ -69,9 +69,6 @@ static device_addrs_t usrp1_find(const device_addr_t &hint) } } - //wait for things to settle - boost::this_thread::sleep(boost::posix_time::milliseconds(1000)); - //get descriptors again with serial number device_list = usb_device_handle::get_device_list(); -- cgit v1.2.3