The D2XX configuration file MUST be called ftd2xx.cfg. This is a simple text file containing various settings and allows for expansion in the future. The file is read on an FT_Open/FT_OpenEx only. 3 sections are available for settings:
An example of the ftd2xx.cfg file is included in the package and each section should be self explanatory. The [Globals] section applies to all devices, the [VID_0403&PID_6001] applies to devices of only VID and PID 0x0403 and 0x6001. The unique settings apply to only those devices of a particular serial number - in the case of the supplied example, [FT000001].
The configuration file must reside in /usr/local/lib or the /usr/lib folder.
It has been noted during beta testing that some multithreaded applications can lock up during write communication with the devices. This is due to a conflict in the application run loop and the write run loop. To prevent lockup with a multithreaded application use the 31st bit (ConfigFlags=0x40000000) in the configuration file. This will enable an alternative FT_Write that has its own thread and will not conflict with the current thread run loop operation.
USB Reset After Open
It is always recommended that you close a file handle obtained by FT_Open/FT_OpenEx before exiting an application. Side effects of not closing the handle with the multithreaded setting (as illustrated above) can be future communication with the device fails (always test this prior to enabling this setting). The Sample applications demonstrate a method of trapping an abnormal exit (control C operation) and closing each handle in turn. If this is not possible then you may require the reset after open bit set in the configuration file. This is bit 32 (ConfigFlags=0x80000000).
Warning - USB reset after open forces USB reset which in turn re-enumerates devices on the USB bus which can result in loss of data and a break in communication. In most cases it is recommended this is NOT used and is only included to cater for the very rare instances that require it. Even though this can be set as a device specific option it is essentially a global operation. Thorough testing is strongly recommended before using this setting as it may affect other USB non-FTDI devices on the USB bus.