Your browser does not allow scripts
Please click here to view a static table of contents without scripts
FT_GetLatencyTimer
Return to Introduction  Previous page  Next page
Get the current value of the latency timer.

FT_STATUS
FT_GetLatencyTimer
(FT_HANDLE ftHandle, PUCHAR pucTimer)




Parameters
ftHandle
Handle of the device.
pucTimer
Pointer to unsigned char to store latency timer value.




Return Value
FT_OK if successful, otherwise the return value is an FT error code.



Remarks
In the FT8U232AM and FT8U245AM devices, the receive buffer timeout that is used to flush remaining data from the receive buffer was fixed at 16 ms. In all other FTDI devices, this timeout is programmable and can be set at 1 ms intervals between 2ms and 255 ms. This allows the device to be better optimized for protocols requiring faster response times from short data packets.



Example

HANDLE ftHandle;
FT_STATUS ftStatus;
UCHAR LatencyTimer;

ftStatus = FT_Open(0, &ftHandle);
if(ftStatus != FT_OK) {
   // FT_Open failed
   return;
}

ftStatus = FT_GetLatencyTimer(ftHandle, &LatencyTimer);
if (ftStatus == FT_OK) {
  // LatencyTimer contains current value
}
else {
  // FT_GetLatencyTimer FAILED!
}

FT_Close(ftHandle);