~ubuntu-branches/ubuntu/intrepid/comedilib/intrepid

« back to all changes in this revision

Viewing changes to doc/man/comedi_data_read.3

  • Committer: Bazaar Package Importer
  • Author(s): David Schleef
  • Date: 2004-11-04 11:43:51 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041104114351-a50kaei5yamka8r6
Tags: 0.7.22-2
It helps if the shared library is actually in the package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\" This manpage has been automatically generated by docbook2man 
 
2
.\" from a DocBook document.  This tool can be found at:
 
3
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
 
4
.\" Please send any bug reports, improvements, comments, patches, 
 
5
.\" etc. to Steve Cheng <steve@ggi-project.org>.
 
6
.TH "COMEDI_DATA_READ" "3" "02 October 2004" "" ""
 
7
 
 
8
.SH NAME
 
9
comedi_data_read \- read single sample from channel
 
10
.SH SYNOPSIS
 
11
.sp
 
12
\fB#include <comedilib.h>
 
13
.sp
 
14
int comedi_data_read (comedi_t * \fIdevice\fB, unsigned int \fIsubdevice\fB, unsigned int \fIchannel\fB, unsigned int \fIrange\fB, unsigned int \fIaref\fB, lsampl_t * \fIdata\fB);
 
15
\fR
 
16
.SH "DESCRIPTION"
 
17
.PP
 
18
Reads a single sample on the channel specified by the Comedi
 
19
device device, the subdevice subdevice, and the channel channel.
 
20
For the A/D conversion (if appropriate),
 
21
the device is configured to use range specification
 
22
range and (if appropriate) analog reference type
 
23
aref. Analog reference types that are not supported
 
24
by the device are silently ignored.
 
25
.PP
 
26
The function comedi_data_read() reads one data value from
 
27
the specified channel and places the data value in the
 
28
location pointed to by data.
 
29
.PP
 
30
WARNING: comedi_data_read() does not do any pausing to
 
31
allow multiplexed analog inputs to settle before
 
32
performing an analog to digital conversion.  If you are
 
33
switching between different channels and need to allow
 
34
your analog input to settle for an accurate reading,
 
35
use comedi_data_read_delayed(), or set the
 
36
input channel at an earlier time with
 
37
comedi_data_read_hint().
 
38
.PP
 
39
On sucess, comedi_data_read() returns 1 (the number of samples
 
40
read).  If there is an error, -1 is returned.
 
41
.PP
 
42
Data values returned by this function are unsigned integers
 
43
less than or equal to the maximum sample value of the channel,
 
44
which can be determined using the function comedi_get_maxdata().
 
45
Conversion of data values to physical units can be performed
 
46
by the function comedi_to_phys().
 
47
.PP