Документ взят из кэша поисковой машины. Адрес оригинального документа : http://mavr.sao.ru/hq/sts/linux/comedi/doc/func-ref-comedi-data-read.html
Дата изменения: Unknown
Дата индексирования: Fri Dec 28 19:51:43 2007
Кодировка:

Поисковые слова: arp 220
comedi_data_read

comedi_data_read

Name

comedi_data_read -- read single sample from channel

Synopsis

#include <comedilib.h>

int comedi_data_read(comedi_t * device, unsigned int subdevice, unsigned int channel, unsigned int range, unsigned int aref, lsampl_t * data);

Description

Reads a single sample on the channel specified by the Comedi device device, the subdevice subdevice, and the channel channel. For the A/D conversion (if appropriate), the device is configured to use range specification range and (if appropriate) analog reference type aref. Analog reference types that are not supported by the device are silently ignored.

The function comedi_data_read() reads one data value from the specified channel and places the data value in the location pointed to by data.

On sucess, comedi_data_read() returns 0. If there is an error, -1 is returned. Data values returned by this function are unsigned integers less than or equal to the maximum sample value of the channel, which can be determined using the function comedi_get_maxdata(). Conversion of data values to physical units can be performed by the function comedi_to_phys().