User guide

ZestSC1 User Guide
CONFIDENTIAL Page 33 of 57
ZestSC1SetTimeOut
ZESTSC1_STATUS ZestSC1SetTimeOut( ZESTSC1_HANDLE Handle,
unsigned long MilliSeconds);
Parameters
Handle Handle of open ZestSC1 card. See ZestSC1OpenCard.
MilliSeconds Length to required timeout in milliseconds.
Return Value
ZESTSC1_SUCCESS Function succeeded
ZESTSC1_ILLEGAL_HANDLE Attempt to use illegal card handle
Description
ZestSC1SetTimeOut can be used to set the length of time, in milliseconds, that
blocking operations should wait for before returning ZESTSC1_TIMEOUT. Time outs
allow the user program to recover cleanly when communication with the card fails. The
default length of the time out is 10 seconds.
For example:
ZESTSC1_HANDLE Handle;
/* Open a card with ID of 1 */
ZestSC1OpenCard(1, &Handle);
/* Set the time out to 20 seconds */
ZestSC1SetTimeOut(Handle, 20000);
/* Perform action and time out if card doesn’t
respond within 20 seconds */
if (ZestSC1ConfigureFromFile(Handle, “test.bit”)==ZESTSC1_TIMEOUT)
printf(“Failed to configure FPGA – time out\n”);