FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  


Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support

New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: Would need to know more details about the FT_Write() function  (Read 1408 times)


  • Newbie
  • *
  • Posts: 1
    • View Profile
Would need to know more details about the FT_Write() function
« on: November 07, 2018, 08:38:51 PM »

A question about the FT_Write() function.

Code: [Select]
FT_STATUS FT_Write (FT_HANDLE ftHandle, LPVOID lpBuffer, DWORD dwBytesToWrite, LPDWORD lpdwBytesWritten)

I wonder about the lpdwBytesWritten.

When will it ever return lpdwBytesWritten < dwBytesToWrite? Would FT_Write return other than FT_OK in that case?

And how much data can I send in one call to FT_Write? What limit has the dwBytesToWrite parameter?


FTDI Community

  • Administrator
  • Sr. Member
  • *****
  • Posts: 413
    • View Profile
Re: Would need to know more details about the FT_Write() function
« Reply #1 on: November 09, 2018, 04:34:06 PM »


Please see the D2XX Programmer's Guide for all available information.

dwBytesToWrite is DWORD type. This is an unsigned, 32-bit unit of data. It can contain an integer value in the range 0 through 4,294,967,295.

FT_Write would return with an error code other than FT_OK if it's not completed successfully.
Error codes can be found in Appendix A - Type Definitions.

You may also want to set FT_SetTimeouts which sets the read and write timeouts for the device.

Please also take a look at AN232B-04 Data Throughput, Latency & Handshaking which provides additional useful information and applies to all our FTDI USB products.

Best Regards,
FTDI Community