Revision 5e047eb5 host/lib/transport/libusb1_device_handle.cpp
| b/host/lib/transport/libusb1_device_handle.cpp | ||
|---|---|---|
| 88 | 88 |
device_addr)); |
| 89 | 89 |
} |
| 90 | 90 |
|
| 91 |
bool check_fsf_device(libusb_device *dev) |
|
| 92 |
{
|
|
| 93 |
libusb_device_descriptor desc; |
|
| 94 |
|
|
| 95 |
if (libusb_get_device_descriptor(dev, &desc) < 0) {
|
|
| 96 |
UHD_ASSERT_THROW("USB: failed to get device descriptor");
|
|
| 97 |
} |
|
| 98 |
|
|
| 99 |
return desc.idVendor == 0xfffe; |
|
| 100 |
} |
|
| 91 | 101 |
|
| 92 | 102 |
std::vector<usb_device_handle::sptr> usb_device_handle::get_device_list() |
| 93 | 103 |
{
|
| ... | ... | |
| 105 | 115 |
ssize_t i = 0; |
| 106 | 116 |
for (i = 0; i < cnt; i++) {
|
| 107 | 117 |
libusb_device *dev = list[i]; |
| 108 |
device_list.push_back(make_usb_device_handle(dev)); |
|
| 118 |
if (check_fsf_device(dev)) |
|
| 119 |
device_list.push_back(make_usb_device_handle(dev)); |
|
| 109 | 120 |
} |
| 110 | 121 |
|
| 111 | 122 |
libusb_free_device_list(list, 0); |
Also available in: Unified diff