libftdi Archives

Subject: 64bit Windows Snapshot Binary

From: Xiaofan Chen <xiaofanc@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 18 Aug 2021 10:22:56 +0800
Here is my build of 64bit Windows binaries for libftdi git head, built
with MSYS2
distribution of MinGW. Python bindings are not built.

URL: https://github.com/mcuee/libftdi/releases/tag/snapshot_usbdk_0684c1b

libftdi_snapshot_bin.zip --> no change to codes
libftdi_snapshot_bin_usbdk.zip --> with one line of change

With the usbdk version, you need to install usbdk
https://github.com/daynix/UsbDk/releases

In that case, you do not need to install WinUSB driver using Zadig and
you do not need to touch the vendor FTDI driver (so you can still use
the VCP and FTD2XX API if needed). But it may be less stable.

diff --git a/src/ftdi.c b/src/ftdi.c
index 0a7fb27..89b5182 100644
--- a/src/ftdi.c
+++ b/src/ftdi.c
@@ -110,7 +110,7 @@ int ftdi_init(struct ftdi_context *ftdi)

     if (libusb_init(&ftdi->usb_ctx) < 0)
         ftdi_error_return(-3, "libusb_init() failed");
-
+       libusb_set_option(&ftdi->usb_ctx, LIBUSB_OPTION_USE_USBDK);
     ftdi_set_interface(ftdi, INTERFACE_ANY);
     ftdi->bitbang_mode = 1; /* when bitbang is enabled this holds the
number of the mode  */



-- 
Xiaofan

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread