NAME

dtoa - digital-to-analog conversion

SYNOPSIS

#include <dtoa_p.h>
#include <stdio_p.h>

FD dopen (path)
char *path;

int dclose (fildes)
FD fildes;

int dwrite (fildes, obuf)
FD fildes;
short obuf;

int dread (fildes, pobuf);
FD fildes;
short *pobuf;

DESCRIPTION

dopen initializes a digital-to-analog device by clearing the channel associated with the device and returning a file descriptor to be used when writing and closing the device. path points to a string "/dev/dac X " X being a channel number between 0 and n-1 where n is the number of analog-to-digital channels configured in the system.

dclose clears the channel associated with fildes and returns 0.

dwrite writes the value obuf to the channel specified by fildes and returns 0.

dread reads the value being output by the channel specified by fildes and stores it at the address passed as pobuf.

FILES

/dev/dacX path name for digital-to-analog channel X.

SEE ALSO

dtoa(3U)

DIAGNOSTICS

If dopen is invoked with a path name not defined by the configuration, it returns -1. If dclose, dwrite, or dread a value of -1 is returned.