Software (SW) APIs require a device driver of the same generation.
Beyond the SW APIs (used for the communication between the host computer and the USB FX2 microcontroller), another set of firmware (FW) API exists: they are called "API Commands". The SW program running on host computer sends API commands to the USB FX2 microcontroller and/or Xilinx MicroBlaze embedded processor by means of the following SW API functions:

The USB FX2 microcontroller and/or Xilinx MicroBlaze soft embedded processor is(/are) able to execute the command. Skilled users can extend the FW API Command modifying USB FX2 microcontroller firmware (and MicroBlaze SW if necessary, but in many case is not necessary).

Even in the case the API command is executed by Xilinx MicroBlaze, it is USB FX2 microcontroller to receive and dispatch the command to Xilinx MicroBlaze. For more information see here.

Generation 2

DLL files:

Documentation:

This API

A binding from Python to DEWESoft TE USB API is possible through the ctypes function library.

Generation 3

Trenz Electronic USB FX2 APIs

  1. TE_USB_FX2_CyAPI API for C/C++
  2. TE_USB_FX2_CyUSB API for .NET Framework

are based on the Cypress CyUSB.sys device driver (renamed as TE_USB_FX2_xx.sys) and respectively on

  1. Cypress CyAPI APIs for C/C++
  2. Cypress CyUSB API for .NET Framework

distributed with the Cypress SuiteUSB 3.4 (or later).
Trenz Electronic USB FX2 APIs do not use handles.

TE_USB_FX2_CyAPI APIs (C++)

API files:

Documentation:

Cypress CyAPI (CyAPI.lib) APIs for C/C++:

Trenz Electronic TE_USB_FX2_CyAPI.dll's for C/C++:


TE_USB_FX2_CyAPI APIs are not pure extern C code libraries because an external creation of a class instance defined in CyAPI.h (CyAPI.lib) is required.
Advantage:

Disadvantage:

A pure extern C code library version of TE_USB_FX2_CyAPI APIs (codename: simplified TE_USB_FX2_CyAPI APIs) is available for developers.
Advantage:

Disadvantages:

TE_USB_FX2_CyUSB API (.NET)

API files:

Documentation:

Cypress CyUSB (CyUSB.dll) API for .NET Framework:

Trenz Electronic TE_USB_FX2_CyUSB.dll for .NET Framework:

Advantage:

Disadvantage:

Differences Between TE_USB_FX2_CyAPI (C++) APIs and TE_USB_FX2_CyUSB (.NET) API

TE_USB_FX2_CyAPI (C++) APIs and TE_USB_FX2_CyUSB (.NET) API do not have the same signature although they are very similar. The signature of the pure extern C code library version of TE_USB_FX2_CyAPI APIs available for developers (codename: simplified TE_USB_FX2_CyAPI APIs) is slightly different from the two signatures above.
TE_USB_FX2_CyUSB (.NET) API is intrinsically cleaner than TE_USB_FX2_CyAPI (C++) APIs because CyUSB.dll is intrinsically cleaner than CyAPI.lib.
Please note that CCyUSBDevice Cypress class in the Cypress CyAPI C++ API is actually the list of all USB devices currently served by a Cypress USB driver derivative (e.g. Cypress generic USB device or Trenz Electronic USB FX2 device). For ease of understanding and convenience, Trenz Electronic named the corresponding variable as USBdevList.

API

Cypress class name

TE USB FX2 variable name

C++ API

CCyUSBDevice

USBdevList

.NET API

USBDeviceList

USBdevList

API

Cypress class name

TE USB FX2 variable name

C++ API

(not available)

(not available)

.NET API

CyUSBDevice

TE_USB_FX2_USBDevice

Most functions, parameters and variables have maintained name and meaning across APIs. A notable exceptions is recalled in the following table.

TE_USB_FX2_CyAPI (C++) APIs

TE_USB_FX2_CyUSB (.NET) API

TE_USB_FX2_SetData_InstanceDriverBuffer()
TE_USB_FX2_SetData()

(not available)
TE_USB_FX2_SetData()

TE_USB_FX2_GetData_InstanceDriverBuffer()
TE_USB_FX2_GetData()

(not available)
TE_USB_FX2_GetData()

Possible Future Work

A pure extern C code library version of TE_USB_FX2_CyAPI (C++) APIs and TE_USB_FX2_CyUSB (.NET) API would

At this moment a simplified TE_USB_FX2_CyAPI (C++) API is used with Open_FUT (gen3) tool but it is not thread safe.

Libusb and libusbx libraries

libusb and libusbx release will be officially merged from v1.0.19. These two project/libraries are already actually ("unofficially") merged.

For Windows, see section "WinUSB driver and Zadig (Generation2, Generation 3, Cypress default and/or custom firmware)" of  Device Driver Layer.

For Linux, see Linux_FUT.

For Mac OS X, see "AN74505 - EZ-USB® FX2LP™ - Developing USB Application on MAC OS X using LIBUSB".

These libraries are not yet officially supported under Windows, but they are already used with TE USB FX2 modules under Linux (see the comunity contribution Linux_FUT).