Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

API Functions descriptions

Info
All these API functions have some parameters to set: Timeout, BufferSize and others.

...

Scroll Title
titleExported function list
SetSW C++ .NET (C#) API function exported
FirstTE_USB_FX2_ScanCards()

TE_USB_FX2_Open()

TE_USB_FX2_Close()
SecondTE_USB_FX2_GetData()
TE_USB_FX2_SetData()
ThirdTE_USB_FX2_SendCommand()

Synchronous Functions

All these functions use a synchronous version for the data transfer (Cypress XferData() function). They perform synchronous (i.e. blocking) I/O operations and do not return until the transaction completes or the endpoint TimeOut has elapsed. A synchronous operation (aka blocking operation) is an operation that owns (in an exclusive way) resources and CPU until its job is done. A synchronous function monopolizes resources until its end, even during idle time.

...

The API uses the synchronous version because it is more suitable to be included in a DLL and it is already fast. With synchronous version, the API functions are simpler to use.

BufferSize (also called XferSize)

BufferSize is the size of the buffer used in data/command transmission/reception of a single endpoint; the total buffer size is the sum of BufferSize of every endpoint used.

...

See Data Transfer Throughput Optimization for some insights into this kind of influence.

PacketSize

PacketSize is the size of packets used in data/command transmission/reception of a single endpoint.

...

See section Data Transfer Throughput Optimization for further insights on this influence.

Timeout Setting

Timeout is the time that is allowed to the function for sending/receiving the data packet passed to the function; this timeout shall be large enough to allow the data/command transmission/reception. Otherwise the transmission/reception will fail.

...

These values have been verified for a Core i7 processor at 2.20 GHz with Microsoft Windows 7. Other configuration may require others value. An AMD Athlon II at 1.30 GHz with Microsoft Windows 7 might require much (e.g. two or three times) larger values. If your host computer is not highly responsive, you should set TimeOut to even larger values : e.g 20, 50, 200, 1000 ms (the less responsive the host computer is, the higher the recommended values shall be).