Download D2XX Programmer`s Guide

Transcript
Document Reference No.: FT_000071
D2XX Programmer's Guide Version 1.3
Clearance No.: FTDI# 170
ftStatus = FT_SetLatencyTimer(ftHandle, LatencyTimer);
if (ftStatus == FT_OK) {
// LatencyTimer set to 10 milliseconds
}
else {
// FT_SetLatencyTimer FAILED!
}
FT_Close(ftHandle);
5.2 FT_GetLatencyTimer
Supported Operating Systems
Linux
Mac OS X (10.4 and later)
Windows (2000 and later)
Windows CE (4.2 and later)
Summary
Get the current value of the latency timer.
Definition
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
FT_HANDLE ftHandle;
FT_STATUS ftStatus;
UCHAR LatencyTimer;
ftStatus = FT_Open(0, &ftHandle);
if(ftStatus != FT_OK) {
// FT_Open failed
Copyright © 2011 Future Technology Devices International Limited
68