mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-29 17:39:36 +02:00
libusb_ll,ftdipp_mpsse: Bus and Device must be both == 0 to use filter or uses VID/PID
This commit is contained in:
@@ -173,7 +173,7 @@ void FTDIpp_MPSSE::open_device(const std::string &serial, unsigned int baudrate)
|
||||
throw std::runtime_error(err);
|
||||
}
|
||||
|
||||
if (_bus == 0 || _addr == 0)
|
||||
if (_bus == 0 && _addr == 0)
|
||||
ret = ftdi_usb_open_desc_index(_ftdi, _vid, _pid, NULL, serial.empty() ? NULL : serial.c_str(), _index);
|
||||
else
|
||||
#if (FTDI_VERSION < 104)
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ int libusb_ll::get_devices_list(const cable_t *cable)
|
||||
bus_addr = cable->bus_addr;
|
||||
device_addr = cable->device_addr;
|
||||
vid_pid_filter = (vid != 0) && (pid != 0);
|
||||
bus_dev_filter = (bus_addr != 0) && (device_addr != 0);
|
||||
bus_dev_filter = ~(bus_addr == 0 && device_addr == 0);
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
|
||||
Reference in New Issue
Block a user