Revision 7aed95a6
| b/host/lib/usrp/usrp1/usrp1_impl.cpp | ||
|---|---|---|
| 60 | 60 |
//since an address is intended for a different, non-USB, device. |
| 61 | 61 |
if (hint.has_key("addr")) return usrp1_addrs;
|
| 62 | 62 |
|
| 63 |
//extract the firmware path for the USRP1 |
|
| 64 |
std::string usrp1_fw_image; |
|
| 65 |
try{
|
|
| 66 |
usrp1_fw_image = find_image_path(hint.get("fw", "usrp1_fw.ihx"));
|
|
| 67 |
} |
|
| 68 |
catch(...){
|
|
| 69 |
uhd::warning::post( |
|
| 70 |
"Could not locate USRP1 firmware.\n" |
|
| 71 |
"Please install the images package.\n" |
|
| 72 |
); |
|
| 73 |
return usrp1_addrs; |
|
| 74 |
} |
|
| 75 |
//std::cout << "USRP1 firmware image: " << usrp1_fw_image << std::endl; |
|
| 76 |
|
|
| 77 | 63 |
boost::uint16_t vid = hint.has_key("uninit") ? FX2_VENDOR_ID : USRP1_VENDOR_ID;
|
| 78 | 64 |
boost::uint16_t pid = hint.has_key("uninit") ? FX2_PRODUCT_ID : USRP1_PRODUCT_ID;
|
| 79 | 65 |
|
| ... | ... | |
| 85 | 71 |
|
| 86 | 72 |
//find the usrps and load firmware |
| 87 | 73 |
BOOST_FOREACH(usb_device_handle::sptr handle, usb_device_handle::get_device_list(vid, pid)) {
|
| 74 |
//extract the firmware path for the USRP1 |
|
| 75 |
std::string usrp1_fw_image; |
|
| 76 |
try{
|
|
| 77 |
usrp1_fw_image = find_image_path(hint.get("fw", "usrp1_fw.ihx"));
|
|
| 78 |
} |
|
| 79 |
catch(...){
|
|
| 80 |
uhd::warning::post( |
|
| 81 |
"Could not locate USRP1 firmware.\n" |
|
| 82 |
"Please install the images package.\n" |
|
| 83 |
); |
|
| 84 |
return usrp1_addrs; |
|
| 85 |
} |
|
| 86 |
//std::cout << "USRP1 firmware image: " << usrp1_fw_image << std::endl; |
|
| 87 |
|
|
| 88 | 88 |
usrp_ctrl::make(usb_control::make(handle))->usrp_load_firmware(usrp1_fw_image); |
| 89 | 89 |
} |
| 90 | 90 |
|
Also available in: Unified diff