1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
4 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
5 <TITLE>Comedi Documentation: Reference Comedilib-0.7.9: functions</TITLE>
6 <LINK HREF="comedilib_reference-3.html" REL=previous>
7 <LINK HREF="comedilib_reference.html#toc4" REL=contents>
11 <A HREF="comedilib_reference-3.html">Previous</A>
12 <A HREF="comedilib_reference.html#toc4">Contents</A>
14 <H2><A NAME="s4">4. Reference Comedilib-0.7.9: functions</A></H2>
18 <H2><A NAME="ss4.1">4.1 comedi_close()</A>
22 <P><CODE>void comedi_close(comedi_t *it);</CODE>
23 <P>Closes a device previously opened by comedi_open().
24 <P>Source: <CODE>/lib/comedi.c</CODE>
26 <H2><A NAME="ss4.2">4.2 comedi_data_read()</A>
30 <P><CODE>int comedi_data_read(comedi_t *it,unsigned int subd,unsigned int chan,
31 unsigned int range,unsigned int aref,lsampl_t *data);</CODE>
32 <P>Reads a single sample on the channel that
33 is specified by the comedi device <CODE>it</CODE>, the
34 subdevice <CODE>subd</CODE>, and the channel <CODE>chan</CODE>.
36 the device is configured to use range specification
37 <CODE>range</CODE> and (if appropriate) analog reference type
38 <CODE>aref</CODE>. Analog reference types that are not supported
39 by the device are silently ignored.
40 <P><CODE>comedi_data_read()</CODE> reads one data value from
41 the specified channel and places the
42 data value that is read in the location pointed to by
44 <P>On sucess, <CODE>comedi_data_read()</CODE> returns 0. If there is an error, -1 is
46 <P>Valid analog reference numbers are:
49 <LI>AREF_GROUND Reference to analog ground</LI>
50 <LI>AREF_COMMON Reference to analog common</LI>
51 <LI>AREF_DIFF Differential reference</LI>
52 <LI>AREF_OTHER Board-specific meaning</LI>
54 <P>Valid data values used by these function is an unsigned integer
55 less than or equal to <CODE>maxdata</CODE>, which is channel-dependent.
56 Conversion of these data value to physical units can be performed
58 <A HREF="#comedi_to_phys">comedi_to_phys()</A></CODE>.
59 <P>Source: <CODE>/lib/data.c</CODE>
62 <H2><A NAME="ss4.3">4.3 comedi_data_write()</A>
66 <P><CODE>int comedi_data_write(comedi_t *it,unsigned int subd,unsigned int chan,
67 unsigned int range,unsigned int aref,lsampl_t data);</CODE>
68 <P>Writes a single sample on the channel that
69 is specified by the comedi device <CODE>it</CODE>, the
70 subdevice <CODE>subd</CODE>, and the channel <CODE>chan</CODE>.
72 the device is configured to use range specification
73 <CODE>range</CODE> and (if appropriate) analog reference type
74 <CODE>aref</CODE>. Analog reference types that are not supported
75 by the device are silently ignored.
76 <P><CODE>comedi_data_write()</CODE> writes the data value
77 specified by the argument <CODE>data</CODE> to
78 the specified channel.
79 <P>On sucess, <CODE>comedi_data_write()</CODE> returns 0. If there is an error, -1 is
81 <P>Valid analog reference numbers are:
84 <LI>AREF_GROUND Reference to analog ground</LI>
85 <LI>AREF_COMMON Reference to analog common</LI>
86 <LI>AREF_DIFF Differential reference</LI>
87 <LI>AREF_OTHER Board-specific meaning</LI>
89 <P>Valid data values used by these functions is an unsigned integer
90 less than or equal to <CODE>maxdata</CODE>, which is channel-dependent.
91 Conversion of physical units to these data value can be performed
93 <A HREF="#comedi_from_phys">comedi_from_phys()</A></CODE>.
94 <P>Source: <CODE>/lib/data.c</CODE>
98 <H2><A NAME="ss4.4">4.4 comedi_dio_bitfield();</A>
101 <P>int comedi_dio_bitfield(comedi_t *it,unsigned int subd,unsigned int write_mask,
103 <P>Source: <CODE>/lib/dio.c</CODE>
106 <H2><A NAME="ss4.5">4.5 comedi_dio_config()</A>
109 <P><CODE>int comedi_dio_config(comedi_t *it,unsigned int subd,unsigned int chan,unsigned int dir);</CODE>
110 <P>The function <CODE>comedi_dio_config</CODE> configures the direction <CODE>dir</CODE> of
111 channel <CODE>chan</CODE> belonging to the configurable digital input/output subdevice
112 <CODE>subd</CODE> of the device <CODE>it</CODE>. Returns -1 on failure.
114 <P>Valid directions are:
116 <LI> COMEDI_INPUT</LI>
117 <LI> COMEDI_OUTPUT</LI>
119 <P>Source: <CODE>/lib/dio.c</CODE>
122 <H2><A NAME="ss4.6">4.6 comedi_dio_read()</A>
125 <P><CODE>int comedi_dio_read(comedi_t *it,unsigned int subd,unsigned int chan,unsigned int *bit);</CODE>
126 <P>The function reads the status of channel <CODE>chan</CODE> belonging to the digital
127 input subdevice <CODE>subd</CODE> of device <CODE>it</CODE>. The result, 0 or 1, is stored
128 in bit. Returns -1 on failure.
129 <P>Source: <CODE>/lib/dio.c</CODE>
132 <H2><A NAME="ss4.7">4.7 comedi_dio_write()</A>
135 <P><CODE>int comedi_dio_write(comedi_t *it,unsigned int subd,unsigned int chan,unsigned int bit);</CODE>
136 <P>The function writes the value of <CODE>bit</CODE>, 0 or 1, in channel <CODE>chan</CODE>,
137 belonging to the digital output device <CODE>subd</CODE> of device <CODE>it</CODE>. Returns
139 <P>Source: <CODE>/lib/dio.c</CODE>
142 <H2><A NAME="ss4.8">4.8 comedi_fileno()</A>
146 <P><CODE>int comedi_fileno(comedi_t *it);</CODE>
147 <P>The function <CODE>comedi_fileno</CODE>
148 returns the integer descriptor for the handle <CODE>it</CODE>. If
149 <CODE>it</CODE> is an invalid <CODE>comedi_t</CODE> pointer, the function
150 returns -1 and sets the appropriate comedilib error value.
151 <P>Source: <CODE>/lib/comedi.c</CODE>
155 <H2><A NAME="ss4.9">4.9 comedi_find_range()</A>
159 <P><CODE>int comedi_find_range(comedi_t *it, unsigned int subdevice, unsigned
160 int chan, unsigned int unit, double min, double max);</CODE>
161 <P>The function <CODE>comedi_find_range</CODE> tries to
162 locate the optimal (smallest) range of a channel <CODE>chan</CODE> belonging to a
163 <CODE>subdevice</CODE> of the comedi device <CODE>it</CODE>, which includes the data
164 range between <CODE>min</CODE> and <CODE>max</CODE> in <CODE>units</CODE> with highest
165 precision. If it finds a matching range,
166 it returns its index. If no matching range is available, it returns -1.
174 <P>Source: <CODE>/lib/range.c</CODE>
178 <H2><A NAME="comedi_errno"></A> <A NAME="ss4.10">4.10 comedi_errno()</A>
181 <P><CODE>int comedi_errno(void);</CODE>
183 <P>When a comedilib function fails, it usually returns -1 or
184 NULL, depending on the return type. An internal library
185 variable stores an error number, which can be retrieved with
186 <CODE>comedi_errno()</CODE>. This error number can be
187 converted to a human-readable form by the functions
189 <A HREF="#comedi_perror">comedi_perror()</A></CODE>
191 <A HREF="#comedi_strerror">comedi_strerror()</A></CODE>.
192 <P>These functions are intended to mimic the behavior of the
193 standard C library functions <CODE>perror()</CODE>,
194 <CODE>strerror</CODE>, and <CODE>errno()</CODE>. In particular,
195 comedilib functions sometimes return an error that is generated
196 inside the C library; the comedi error message in this case
197 is the same as the C library.
198 <P>The function <CODE>comedi_errno()</CODE>
199 returns an integer describing the most recent comedilib error. This
200 integer may be used as the <CODE>errnum</CODE> parameter for
202 <A HREF="#comedi_strerror">comedi_strerror()</A></CODE>.
203 <P>Source: <CODE>/lib/error.c</CODE>
207 <H2><A NAME="ss4.11">4.11 comedi_find_subdevice_by_type()</A>
211 <P><CODE>int comedi_find_subdevice_by_type(comedi_t *it,int type,unsigned int
212 start_subdevice);</CODE>
213 <P>The function <CODE>comedi_find_subdevice_by_type</CODE> tries to
214 locate a subdevice belonging to comedi device <CODE>it</CODE>,
215 having type <CODE>type</CODE>, starting with the subdevice
216 <CODE>start_subdevice</CODE>. If it finds the requested subdevice,
217 it returns its index. If it does not locate the requested
218 subdevice, it returns -1 and sets the comedi error number to
219 "subdevice not found". If there is an error, the function
220 returns -1 and sets the appropriate error.
221 <P>For subdevice types, see the manual page for the function
223 <A HREF="#comedi_get_subdevice_type">comedi_get_subdevice_type()</A></CODE>.
224 <P>Source: <CODE>/lib/get.c</CODE>
228 <H2><A NAME="comedi_from_phys"></A> <A NAME="ss4.12">4.12 comedi_from_phys()</A>
232 <P><CODE>lsampl_t comedi_from_phys(double data, comedi_range *rng, lsampl_t maxdata);</CODE>
233 <P>Converts data given in physical units (double) into sample values (lsampl_t, between 0 and maxdata).
234 The parameter <CODE>rng</CODE> represents the conversion information to use, and the parameter <CODE>maxdata</CODE> represents
235 the maximum possible data value for the channel that the data will be written to.
236 <P>Source: <CODE>/lib/range.c</CODE>
240 <H2><A NAME="ss4.13">4.13 comedi_get_board_name()</A>
244 <P><CODE>char *comedi_get_board_name(comedi_t *it);</CODE>
245 <P>The function <CODE>comedi_get_board_name</CODE> returns a pointer
246 to a string containing the name of the device. This pointer is
247 valid until the comedi descriptor <CODE>it</CODE> is closed. This
248 function returns NULL if there is an error.
249 <P>Source: <CODE>/lib/get.c</CODE>
253 <H2><A NAME="ss4.14">4.14 comedi_get_driver_name()</A>
257 <P><CODE>char *comedi_get_driver_name(comedi_t *it);</CODE>
258 <P>The function <CODE>comedi_get_driver_name</CODE> returns a pointer
259 to a string containing the name of the driver being used by comedi
260 for the comedi device represented by <CODE>it</CODE>. This pointer is
261 valid until the comedi descriptor <CODE>it</CODE> is closed. This
262 function returns NULL if there is an error.
263 <P>Source: <CODE>/lib/get.c</CODE>
267 <H2><A NAME="ss4.15">4.15 comedi_get_maxdata()</A>
271 <P><CODE>lsampl_t comedi_get_maxdata(comedi_t *it,unsigned int subdevice,unsigned int
273 <P>The function <CODE>comedi_get_maxdata()</CODE> returns the maximum
274 valid data value for channel <CODE>chan</CODE> of subdevice
275 <CODE>subdevice</CODE> belonging to the comedi device <CODE>it</CODE>
276 This function returns 0 on error.
277 <P>Source: <CODE>/lib/get.c</CODE>
281 <H2><A NAME="ss4.16">4.16 comedi_get_n_channels()</A>
285 <P><CODE>int comedi_get_n_channels(comedi_t *it,unsigned int subdevice);</CODE>
286 <P>The function <CODE>comedi_get_n_channels()</CODE> returns the number
287 of channels of the subdevice belonging to the comedi device <CODE>it</CODE>
288 and having index <CODE>subdevice</CODE>. This function returns -1 on error.
289 <P>Source: <CODE>/lib/get.c</CODE>
293 <H2><A NAME="ss4.17">4.17 comedi_get_n_ranges()</A>
297 <P><CODE>int comedi_get_n_ranges(comedi_t *it,unsigned int subdevice, unsigned int
299 <P>The function <CODE>comedi_get_n_ranges()</CODE> returns the number
300 of ranges of the channel <CODE>chan</CODE> belonging to the <CODE>subdevice</CODE>
301 of the comedi device <CODE>it</CODE>. This function returns -1 on error.
302 <P>Source: <CODE>/lib/range.c</CODE>
306 <H2><A NAME="ss4.18">4.18 comedi_get_n_subdevices()</A>
310 <P><CODE>int comedi_get_n_subdevices(comedi_t *it);</CODE>
311 <P>The function <CODE>comedi_get_n_subdevices</CODE> returns the
312 number of subdevices associated with the comedi descriptor
313 <CODE>it</CODE>, or -1 if there is an error.
314 <P>Source: <CODE>/lib/get.c</CODE>
318 <H2><A NAME="ss4.19">4.19 comedi_get_range()</A>
322 <P><CODE>comedi_range * comedi_get_range(comedi_t *it,unsigned int subdevice,unsigned int chan,unsigned int
324 <P>The function <CODE>comedi_get_range</CODE> returns a pointer to a
325 comedi_range structure that contains information that can be used to
326 convert sample values to or from physical units. The pointer is valid
327 until the comedi device <CODE>it</CODE> is closed. If there is an
328 error, NULL is returned.
329 <P>Source: <CODE>/lib/get.c</CODE>
332 <H2><A NAME="ss4.20">4.20 comedi_get_rangetype()</A>
336 <P><CODE>int comedi_get_rangetype(comedi_t *it,unsigned int subdevice,unsigned int
338 <P>The function <CODE>comedi_get_rangetype()</CODE> returns an integer
339 that represents the number of range specifications available for a
340 particular channel <CODE>chan</CODE> of the subdevice <CODE>subdevice</CODE>, as well as a conversion table to convert sample
341 values to/from physical units.
343 <CODE>RANGE_LENGTH(rangetype)</CODE>
344 can be used to determine the number of range specifications for a given
346 <P>Source: <CODE>/lib/get.c</CODE>
349 <H2><A NAME="comedi_get_subdevice_type"></A> <A NAME="ss4.21">4.21 comedi_get_subdevice_type()</A>
353 <P><CODE>int comedi_get_subdevice_type(comedi_t *it,unsigned int subdevice);</CODE>
354 <P>The function <CODE>comedi_get_subdevice_type()</CODE> returns an
355 integer describing the type of subdevice that belongs to the comedi
356 device <CODE>it</CODE> and has the index <CODE>subdevice</CODE>. The
357 function returns -1 is there is an error.
358 <P>Valid subdevice types are:
361 <LI><CODE>COMEDI_SUBD_UNUSED</CODE>
362 Subdevice has no functionality, i.e., a place-holder.</LI>
363 <LI><CODE>COMEDI_SUBD_AI</CODE> Analog input</LI>
364 <LI><CODE>COMEDI_SUBD_AO</CODE> Analog output</LI>
365 <LI><CODE>COMEDI_SUBD_DI</CODE> Digital input</LI>
366 <LI><CODE>COMEDI_SUBD_DO</CODE> Digital output</LI>
367 <LI><CODE>COMEDI_SUBD_DIO</CODE>
368 Digital input/output. Channels are configurable as to whether they
369 are inputs or outputs.</LI>
370 <LI><CODE>COMEDI_SUBD_COUNTER</CODE> Counter</LI>
371 <LI><CODE>COMEDI_SUBD_TIMER</CODE> Timer</LI>
372 <LI><CODE>COMEDI_SUBD_MEMORY</CODE>
373 Memory, e.g., EEPROM or dual-ported RAM</LI>
374 <LI><CODE>COMEDI_SUBD_CALIB</CODE>
375 Calibration DACs</LI>
376 <LI><CODE>COMEDI_SUBD_PROC</CODE>
377 Processor or DSP</LI>
379 <P>Source: <CODE>/lib/get.c</CODE>
382 <H2><A NAME="ss4.22">4.22 comedi_get_timer()</A>
389 int comedi_get_timer(comedi_t *it,unsigned int subdev, double freq,unsigned int *trigvar,
390 double *actual_freq);
393 <P><CODE>comedi_get_timer</CODE> returns the type of the timer of the subdevice
394 <CODE>subdev</CODE> of the device <CODE>it</CODE> ,
395 <P>Supported timers are:
399 <LI>dt282x_timer</LI>
400 <LI>dt2814_timer</LI>
402 <LI>acl8112_timer</LI>
403 <LI>nanosec_timer</LI>
405 <P>Source: <CODE>/lib/timer.c</CODE>
408 <H2><A NAME="ss4.23">4.23 comedi_get_version_code()</A>
412 <P><CODE>int comedi_get_version_code(comedi_t *it);</CODE>
413 <P>The function <CODE>comedi_get_version_code()</CODE> returns the
414 version code of the currently running comedi module. The version
415 code is of the form 0x01072b, which is the version code for
417 <P>Source: <CODE>/lib/get.c</CODE>
420 <H2><A NAME="ss4.24">4.24 comedi_loglevel()</A>
424 <P><CODE>int comedi_loglevel(int loglevel);</CODE>
425 <P>This function affects the output of debugging and error messages
426 from comedlib. By increasing the loglevel, additional debugging
427 information will be printed. This function returns the previous
428 loglevel. Some debugging information will only be printed if
429 comedilib was compiled with this debugging information included.
430 The loglevel can also be affected by the environment
431 variable COMEDI_LOGLEVEL. The meaning of the loglevels is as
433 <P>COMEDILIB_LOGLEVEL=0
434 <P>Comedilib prints nothing.
435 <P>COMEDILIB_LOGLEVEL=1 (default)
436 <P>Comedilib only prints error messages when there is a
437 self-consistency error.
438 <P>COMEDILIB_LOGLEVEL=2
439 <P>Comedilib prints an error message whenever an invalid
440 parameter is passed to comedilib.
441 <P>COMEDILIB_LOGLEVEL=3
442 <P>Comedilib prints an error message whenever an error is generated
443 in the comedilib library or is generated in the C library when
445 <P>COMEDILIB_LOGLEVEL=4
446 <P>Comedilib prints a lot of debugging messages.
448 <P>Source: <CODE>/lib/error.c</CODE>
451 <H2><A NAME="ss4.25">4.25 comedi_open()</A>
455 <P><CODE>comedi_t *comedi_open(char *fn);</CODE>
456 <P>Opens a comedi device specified by the filename fn. Returns NULL
457 on error. Returns a handle that is given as a parameter to other
459 <P>You are not supposed to have access to the structure comedi_t.
460 <P>Source: <CODE>/lib/comedi.c</CODE>
464 <H2><A NAME="comedi_perror"></A> <A NAME="ss4.26">4.26 comedi_perror()</A>
468 <P><CODE>void comedi_perror(const char *s);</CODE>
469 <P>When a comedilib function fails, it usually returns -1 or
470 NULL, depending on the return type. An internal library
471 variable stores an error number, which can be retrieved with
473 <A HREF="#comedi_errno">comedi_errno()</A></CODE>.
474 This error number can be
475 converted to a human-readable form by the functions
476 <CODE>comedi_perror()</CODE>
478 <A HREF="#comedi_strerror">comedi_strerror()</A></CODE>.
479 <P>These functions are intended to mimic the behavior of the
480 standard C library functions <CODE>perror()</CODE>,
481 <CODE>strerror</CODE>, and <CODE>errno()</CODE>. In particular,
482 comedilib functions sometimes return an error that is generated
483 inside the C library; the comedi error message in this case
484 is the same as the C library.
485 <P>The function <CODE>comedi_perror()</CODE> prints an error
486 message to stderr. The error message consists of the
487 argument string, a colon, a space, a description of the error
488 condition, and a new line.
489 <P>Source: <CODE>/lib/error.c</CODE>
493 <H2><A NAME="comedi_strerror"></A> <A NAME="ss4.27">4.27 comedi_strerror()</A>
497 <P><CODE>*comedi_strerror(int errnum);</CODE>
498 <P>When a comedilib function fails, it usually returns -1 or
499 NULL, depending on the return type. An internal library
500 variable stores an error number, which can be retrieved with
502 <A HREF="#comedi_errno">comedi_errno()</A></CODE>. This error number can be
503 converted to a human-readable form by the functions
505 <A HREF="#comedi_perror">comedi_perror()</A></CODE>
506 and <CODE>comedi_strerror()</CODE>.
507 <P>These functions are intended to mimic the behavior of the
508 standard C library functions <CODE>perror()</CODE>,
509 <CODE>strerror</CODE>, and <CODE>errno()</CODE>. In particular,
510 comedilib functions sometimes return an error that is generated
511 inside the C library; the comedi error message in this case
512 is the same as the C library.
513 <P>The function <CODE>comedi_strerror()</CODE> returns a pointer to a
515 describing the comedilib error <CODE>errnum</CODE>. The persistence
516 of the returned pointer is undefined, and should not be trusted
517 after the next comedilib call. An unrecognized error number will
518 return a pointer to the string "undefined error", or similar.
519 <P>Valid error strings are:
522 <LI><CODE>"No error"</CODE></LI>
523 <LI><CODE>"Unknown error</CODE></LI>
524 <LI><CODE>"Bad comedi_t structure"</CODE></LI>
525 <LI><CODE>"Invalid subdevice"</CODE></LI>
526 <LI><CODE>"Invalid channel"</CODE></LI>
528 <P>Source: <CODE>/lib/error.c</CODE>
532 <H2><A NAME="ss4.28">4.28 comedi_sv_init()</A>
536 <P><CODE>int comedi_sv_init(comedi_sv_t *sv,comedi_t *dev,unsigned int subd,
537 unsigned int chan);</CODE>
538 <P>The special functions <CODE>comedi_sv_*()</CODE> are designed to
539 make it easy to accurately measure slowly varying analog inputs.
540 A slowly varying input is one that is effectively constant over the course
541 of approximately 100 A/D conversions. However, since these
542 conversions can sometimes be pre-empted by scheduling, for most
543 purposes, a slowly varying signal should be effectively constant
544 for greater than 20 ms (the default Linux timeslice).
545 <P>By averaging many A/D conversions of a relatively constant
546 signal, it is possible to get a better measurement of the signal
547 than a single A/D conversion. In general, the uncertainty of the
548 measurement decreases as the square root of the number of samples.
549 This is limited by the rate that which the signal varies, and
550 ultimately by the spurious free dynamic range of the A/D converter.
551 <P><CODE>comedi_sv_init</CODE> initializes the slow varying comedi structure
552 <CODE>sv</CODE> of the device <CODE>dev</CODE>, the subdevice <CODE>subd</CODE> (analog input) and
553 the channel <CODE>chan</CODE>.
554 The slow varying comedi structure <CODE>sv</CODE> of type <CODE>
555 <A HREF="comedilib_reference-2.html#comedi_sv_t">comedi_sv_t</A></CODE>
556 specifies the signal measurement. Default number of averaged samples is 100.
557 Returns zero on success, -1 on error.
558 <P>Source: <CODE>/lib/sv.c</CODE>
562 <H2><A NAME="ss4.29">4.29 comedi_sv_update()</A>
566 <P><CODE>int comedi_sv_update(comedi_sv_t *sv);</CODE>
567 <P><CODE>comedi_sv_update</CODE> updates the slow varying comedi structure
569 Returns zero on success, -1 on error.
570 <P>Source: <CODE>/lib/sv.c</CODE>
574 <H2><A NAME="ss4.30">4.30 int comedi_sv_measure()</A>
578 <P><CODE>int comedi_sv_measure(comedi_sv_t *it,double *data);</CODE>
579 <P><CODE>comedi_sv_measure</CODE> measures the slow variing signal. The measurement
580 is specified by the slow varying comedi structure <CODE>sv</CODE>, the result is
581 stored in <CODE>data</CODE>.
582 On success returns the number of samples, -1 on error.
583 <P>Source: <CODE>/lib/sv.c</CODE>
587 <H2><A NAME="comedi_to_phys"></A> <A NAME="ss4.31">4.31 comedi_to_phys()</A>
591 <P><CODE>double comedi_to_phys(lsampl_t data, comedi_range *rng, lsampl_t maxdata);</CODE>
592 <P>Converts data given in sample values (lsampl_t, between 0 and maxdata) into physical units (double).
593 The parameter <CODE>rng</CODE> represents the conversion information to use, and the parameter <CODE>maxdata</CODE> represents
594 the maximum possible data value for the channel that the data was read.
595 <P>Source: <CODE>/lib/range.c</CODE>
599 <H2><A NAME="ss4.32">4.32 comedi_trigger()</A>
603 <P><CODE>int comedi_trigger(comedi_t *it,comedi_trig *trig);</CODE>
604 <P>The function <CODE>comedi_trigger()</CODE> instructs comedi to
605 perform the command specified by the
606 <A HREF="comedilib_reference-3.html#comedi_trig_struct">trigger structure</A>
607 <CODE>trig</CODE>. Results depend on the particular command
608 being issued. If there is an error, -1 is returned.
609 <P>Complete information about comedi commands is given in the
610 manual page comedi(8).
611 <P>Source: <CODE>/lib/comedi.c</CODE>
626 <H2><A NAME="ss4.33">4.33 comedi_get_timer()</A>
633 int comedi_get_timer(comedi_t *it,unsigned int subdev,double freq,unsigned int *trigvar,
634 double *actual_freq);
643 <A HREF="comedilib_reference-3.html">Previous</A>
644 <A HREF="comedilib_reference.html#toc4">Contents</A>