aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1/usrp1_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-03-03 11:18:50 -0800
committerJosh Blum <josh@joshknows.com>2011-03-03 11:18:50 -0800
commitf938ed7938021c10bb0a0ce47e6d40d10f89abc2 (patch)
tree0c6793bd4bd8ba0a03ee8d83a0b67e3fe231356c /host/lib/usrp/usrp1/usrp1_impl.cpp
parentb99c655d2ae52ee14e6430b175fe4849ccc0f0e7 (diff)
parent7aed95a658deb52404ba49774cfcecf96df654a8 (diff)
downloaduhd-f938ed7938021c10bb0a0ce47e6d40d10f89abc2.tar.gz
uhd-f938ed7938021c10bb0a0ce47e6d40d10f89abc2.tar.bz2
uhd-f938ed7938021c10bb0a0ce47e6d40d10f89abc2.zip
Merge branch 'master' into next
Conflicts: host/lib/usrp/usrp2/mboard_impl.cpp host/lib/usrp/usrp2/usrp2_impl.cpp
Diffstat (limited to 'host/lib/usrp/usrp1/usrp1_impl.cpp')
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index 1ec332a61..caea7c043 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -60,20 +60,6 @@ static device_addrs_t usrp1_find(const device_addr_t &hint)
//since an address is intended for a different, non-USB, device.
if (hint.has_key("addr")) return usrp1_addrs;
- //extract the firmware path for the USRP1
- std::string usrp1_fw_image;
- try{
- usrp1_fw_image = find_image_path(hint.get("fw", "usrp1_fw.ihx"));
- }
- catch(...){
- uhd::warning::post(
- "Could not locate USRP1 firmware.\n"
- "Please install the images package.\n"
- );
- return usrp1_addrs;
- }
- //std::cout << "USRP1 firmware image: " << usrp1_fw_image << std::endl;
-
boost::uint16_t vid = hint.has_key("uninit") ? FX2_VENDOR_ID : USRP1_VENDOR_ID;
boost::uint16_t pid = hint.has_key("uninit") ? FX2_PRODUCT_ID : USRP1_PRODUCT_ID;
@@ -85,6 +71,20 @@ static device_addrs_t usrp1_find(const device_addr_t &hint)
//find the usrps and load firmware
BOOST_FOREACH(usb_device_handle::sptr handle, usb_device_handle::get_device_list(vid, pid)) {
+ //extract the firmware path for the USRP1
+ std::string usrp1_fw_image;
+ try{
+ usrp1_fw_image = find_image_path(hint.get("fw", "usrp1_fw.ihx"));
+ }
+ catch(...){
+ uhd::warning::post(
+ "Could not locate USRP1 firmware.\n"
+ "Please install the images package.\n"
+ );
+ return usrp1_addrs;
+ }
+ //std::cout << "USRP1 firmware image: " << usrp1_fw_image << std::endl;
+
usrp_ctrl::make(usb_control::make(handle))->usrp_load_firmware(usrp1_fw_image);
}