21.07.2015 Views

Programming Info D2XXPG31.pdf

Programming Info D2XXPG31.pdf

Programming Info D2XXPG31.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

67 D2XX Programmer's Guide4.2 FT_SetLatencyTimerSet the latency timer.FT_STATUS FT_SetLatencyTimer(FT_HANDLE ftHandle, UCHAR ucTimer)ParametersftHandleucTimerHandle of the device.Required value, in milliseconds, of latency timer. Valid range is2 - 255.Return ValueFT_OK if successful, otherwise the return value is an FT error code.RemarksIn the FT8U232AM and FT8U245AM devices, the receive buffer timeout that is used to flushremaining data from the receive buffer was fixed at 16 ms. In all other FTDI devices, this timeout isprogrammable and can be set at 1 ms intervals between 2ms and 255 ms. This allows the deviceto be better optimized for protocols requiring faster response times from short data packets.ExampleHANDLE ftHandle;FT_STATUS ftStatus;UCHAR LatencyTimer = 10;ftStatus = FT_Open(0, &ftHandle);if(ftStatus != FT_OK) {// FT_Open failedreturn;}ftStatus = FT_SetLatencyTimer(ftHandle, LatencyTimer);if (ftStatus == FT_OK) {// LatencyTimer set to 10 milliseconds}else {// FT_SetLatencyTimer FAILED!}FT_Close(ftHandle);© Future Technology Devices International Ltd. 2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!