TDRV006-SW-82 - Linux Device Driver
Page 27 of 31
EXAMPLE
#include <tdrv006api.h>
TDRV006_HANDLE
hdl;
TDRV006_STATUS
result;
/*
** Wait for a high-to-low transition on input line 0
** Timeout after 10 seconds
*/
result = tdrv006WaitForHighToLow (hdl, 0, 10000);
if (result != TDRV006_OK)
{
/* error handling */
}
RETURN VALUE
On success, TDRV006_OK is returned. In the case of an error, the appropriate error code is returned
by the function.
ERROR CODES
Error Code
Description
TDRV006_ERR_INVAL
Invalid parameter specified
TDRV006_ERR_BUSY
The
number
of
waiting
processes
exceeded
the
maximum number
TDRV006_ERR_INVALID_HANDLE
The device handle is invalid
TDRV006_ERR_TIMEOUT
Timeout occurred.