FT_STATUS
|
FT_StopInTask
|
(FT_HANDLE ftHandle)
|
Parameters
ftHandle
|
Handle of the device.
|
Return Value
FT_OK if successful, otherwise the return value is an FT error code.
Remarks
This function is used to put the driver's IN task (read) into a wait state. It can be used in situations where data is being received continuously, so that the device can be purged without more data being received. It is used together with FT_RestartInTask which sets the IN task running again.
Example
This example shows how to use FT_StopInTask.
FT_HANDLE ftHandle;
FT_STATUS ftStatus;
ftStatus = FT_Open(0, &ftHandle);
if(ftStatus != FT_OK) {
// FT_Open failed
return;
}
do {
ftStatus = FT_StopInTask(ftHandle);
} while (ftStatus != FT_OK);
//
// Do something - for example purge device
//
do {
ftStatus = FT_RestartInTask(ftHandle);
} while (ftStatus != FT_OK);
FT_Close(ftHandle);