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: FT_GetQueueStatus() does not return a DWORD  (Read 796 times)


  • Newbie
  • *
  • Posts: 1
    • View Profile
FT_GetQueueStatus() does not return a DWORD
« on: November 06, 2019, 09:25:59 PM »


I'm using an FT232H in ASYNC Serial mode.
I'm calling FT_GetQueueStatus() to understand how many characters has been received, and how many "data packets" (200-byte each in my case) I can read from the RX queue. Even if I'm using a DWORD pointer for the lpdwAmountInRxQueue parameter, it seems that the returned value saturates to 2^16 (65536, thus it is not for some strange reason internally handled as a 16-bit value, that will lead to 2^16-1 max).

In any case, if I receive more than 2^16 bytes, let's say 70k, data is correctly kept in the queue; reading some of them to go below 2^16, say 20k, FT_GetQueueStatus() starts again to indicate the correct number of bytes in the queue.

I overcomed the issue with a loop around the getStatus and Read, but I was wondering if this is a bug or something well known, but not fully documented.

Thanks and regards,