mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-30 18:02:38 +02:00
ftdipp_mpsse: add workaround for libftdi < 1.4
This commit is contained in:
@@ -81,7 +81,11 @@ void FTDIpp_MPSSE::open_device(unsigned int baudrate)
|
||||
if (_bus == -1 or _addr == -1)
|
||||
ret = ftdi_usb_open_desc(_ftdi, _vid, _pid, NULL, NULL);
|
||||
else
|
||||
#if (OLD_FTDI_VERSION == 1)
|
||||
ret = ftdi_usb_open_desc(_ftdi, _vid, _pid, _product, NULL);
|
||||
#else
|
||||
ret = ftdi_usb_open_bus_addr(_ftdi, _bus, _addr);
|
||||
#endif
|
||||
if (ret < 0) {
|
||||
fprintf(stderr, "unable to open ftdi device: %d (%s)\n",
|
||||
ret, ftdi_get_error_string(_ftdi));
|
||||
|
||||
Reference in New Issue
Block a user