libdac

Section: Linux Simple I/O Library (2)
Updated: 4 February 2019
Index Return to Main Contents
 

NAME

libdac -- Linux Simple I/O Library: D/A Input Module  

SYNOPSIS

#include <libsimpleio/libdac.h>

void DAC_get_name(int32_t chip, char *name, int32_t namesize,
  int32_t *error);

void DAC_open(int32_t chip, int32_t channel, int32_t *fd,
  int32_t *error);

void DAC_close(int32_t fd, int32_t *error);

void DAC_write(int32_t fd, int32_t sample, int32_t *error);

Link with -lsimpleio.  

DESCRIPTION

All functions return either 0 (upon success) or an errno value (upon failure) in *error.

DAC_get_name() fetches an information string for a D/A device. The chip number must be passed in chip. The destination buffer address must be passed in *name and the destination buffer size must be passed in namesize. The minimum size for the destination buffer is 16 bytes.

DAC_open() opens a D/A output channel device. The D/A chip number must be passed in the chip parameter and the D/A output channel number must be passed in the channel parameter. Upon success, a file descriptor for the D/A output channel device is returned in *fd.

DAC_close() closes a previously opened D/A output channel device.

DAC_write() writes a sample to a D/A output channel device. The file descriptor for an open D/A output channel device must be passed in the fd parameter. The analog sample data must be passed in the sample parameter.  

SEE ALSO

libsimpleio(2), libadc(2), libevent(2), libgpio(2), libhidraw(2),
libi2c(2), libipv4(2), liblinux(2), liblinx(2), libpwm(2),
libserial(2), libspi(2), libstream(2), libwatchdog(2)

https://wiki.analog.com/software/linux/docs/iio/iio  

AUTHOR

Philip Munts dba Munts Technologies


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
AUTHOR

This document was created by man2html, using the manual pages.
Time: 03:28:51 GMT, October 30, 2023