Download TDRV016-SW-42

Transcript
Example
#include “tdrv016.h”
TDRV016_DEV
STATUS
pDev;
result;
/*
** Load Q-DACs 1 and 8 simultaneously.
*/
result = tdrv016QDacLoad(
pDev,
((1 << 7) | (1 << 0)));
if (result == ERROR)
{
/* handle error */
}
else
{
/* successful */
}
RETURN VALUE
OK if function succeeds or ERROR.
ERROR CODES
The error codes are stored in errno and can be read with the function errnoGet().
Error code
Description
EINVAL
Invalid Q-DAC specified.
EACCES
At least one of the specified Q-DACs is not in M-Mode.
EBADF
The device handle is invalid
TDRV016-SW-42 – VxWorks Device Driver
Page 27 of 48