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