5ddb10ce6658d008eb1d7a89b9b10ddbb9a2b70d
[comedilib.git] / doc / deprecated_funcref.txt
1 Deprecated functions
2 Function: comedi_dio_bitfield -- read/write multiple digital channels
3 Retval: int
4 Param: comedi_t * device
5 Param: unsigned int subdevice
6 Param: unsigned int write_mask
7 Param: unsigned int * bits
8 Status: deprecated
9 Description:
10  This function is deprecated.  Use comedi_dio_bitfield2() instead.
11
12 Function: comedi_from_phys -- convert physical units to sample
13 Retval: lsampl_t
14 Param: double data
15 Param: comedi_range * range
16 Param: lsampl_t maxdata
17 Status: deprecated
18 Description:
19  Converts data given in physical units (data) into sample values
20  (lsampl_t, between 0 and maxdata).  The parameter rng
21  represents the conversion information to use, and the parameter
22  maxdata represents the maximum possible data value for the
23  channel that the data will be written to.
24
25  Conversion is not affected by out-of-range behavior.  Out-of-range
26  data parameters are silently truncated to the range 0 to maxdata.
27
28 Function: comedi_get_timer -- timer information (deprecated)
29 Retval: int
30 Param: comedi_t * device
31 Param: unsigned int subdevice
32 Param: double frequency
33 Param: unsigned int * trigvar
34 Param: double * actual_frequency
35 Status: deprecated
36 Description:
37  The function comedi_get_timer converts the frequency frequency
38  to a number suitable to send to the driver in a comedi_trig
39  structure.  This function remains for compatibility with very
40  old versions of Comedi, that converted sampling rates to timer
41  values in the libary.  This conversion is now done in the kernel,
42  and every device has the timer type nanosec_timer, indicating
43  that timer values are simply a time specified in nanoseconds.
44
45 Function: comedi_set_global_oor_behavior -- out-of-range behavior
46 Retval: int
47 Param: enum comedi_oor_behavior behavior
48 Status: deprecated
49 Description:
50  This function changes the Comedilib out-of-range behavior.
51  This currently affects the behavior of comedi_to_phys() when
52  converting endpoint sample values, that is, sample values
53  equal to 0 or maxdata.  If the out-of-range behavior is set to
54  COMEDI_OOR_NAN, endpoint values are converted to NAN.  If the
55  out-of-range behavior is set to COMEDI_OOR_NUMBER, the endpoint
56  values are converted similarly to other values.
57
58  The previous out-of-range behavior is returned.
59
60 Function: comedi_sv_init -- slowly-varying inputs
61 Retval: int
62 Param: comedi_sv_t * sv
63 Param: comedi_t * device
64 Param: unsigned int subdevice
65 Param: unsigned int channel
66 Status: deprecated
67 Description:
68  The function comedi_sv_init() initializes the slow varying Comedi
69  structure sv to use the device device, the analog input subdevice
70  subdevice, and the channel channel.  The slow varying Comedi
71  structure is used by comedi_sv_measure() to accurately measure
72  an analog input by averaging over many samples.  The default
73  number of samples is 100.  This function returns 0 on success,
74  -1 on error.
75
76 Function: comedi_sv_measure -- slowly-varying inputs
77 Retval: int
78 Param: comedi_sv_t * sv
79 Param: double * data
80 Status: deprecated
81 Description:
82  The function comedi_sv_measure() uses the slowly varying Comedi
83  structure sv to measure a slowly varying signal.  If successful,
84  the result (in physical units) is stored in the location pointed
85  to by data, and the number of samples is returned.  On error, -1
86  is returned.
87
88 Function: comedi_sv_update -- slowly-varying inputs
89 Retval: int
90 Param: comedi_sv_t * sv
91 Status: deprecated
92 Description:
93  The function comedi_sv_update() updates internal parameters of
94  the slowly varying Comedi structure sv.
95
96 Function: comedi_timed_1chan -- streaming input (deprecated)
97 Retval: int
98 Param: comedi_t * device
99 Param: unsigned int subdevice
100 Param: unsigned int channel
101 Param: unsigned int range
102 Param: unsigned int aref
103 Param: double frequency
104 Param: unsigned int num_samples
105 Param: double * data
106 Status: deprecated
107 Description:
108  Not documented.
109
110 Function: comedi_to_phys -- convert sample to physical units
111 Retval: double
112 Param: lsampl_t data
113 Param: comedi_range * range
114 Param: lsampl_t maxdata
115 Status: deprecated
116 Description:
117  Converts data given in sample values (lsampl_t, between 0 and
118  maxdata) into physical units (double).  The parameter range
119  represents the conversion information to use, and the parameter
120  maxdata represents the maximum possible data value for the
121  channel that the data was read.
122
123  Conversion of endpoint sample values, that is, sample values
124  equal to 0 or maxdata, is affected by the Comedilib out-of-range
125  behavior.  If the out-of-range behavior is set to COMEDI_OOR_NAN,
126  endpoint values are converted to NAN.  If the out-of-range
127  behavior is set to COMEDI_OOR_NUMBER, the endpoint values are
128  converted similarly to other values.
129
130  If there is an error, NAN is returned.
131
132 Function: comedi_trigger -- perform streaming input/output (deprecated)
133 Retval: int
134 Param: comedi_t * device
135 Param: comedi_trig * trig
136 Status: deprecated
137 Description:
138  The function comedi_trigger() instructs Comedi to
139  perform the command specified by the trigger structure trig.
140  The return value depends on
141  the particular trig being issued.  If there is an
142  error, -1 is returned.