Download TDRV016-SW-42

Transcript
Example
#include “tdrv016.h”
TDRV016_DEV
STATUS
pDev;
result;
/*
** Write new DAC value to channel 1, use data correction.
*/
result = tdrv016DacWrite(
pDev,
1,
0x1000,
TDRV016_CORR);
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 DAC channel specified.
ENOTSUP
The specified channel is not in I- or M-Mode.
EBADF
The device handle is invalid
TDRV016-SW-42 – VxWorks Device Driver
Page 23 of 48