1COMEDI_DIGITAL_TRIGG(3)        Comedi reference        COMEDI_DIGITAL_TRIGG(3)
2
3
4

NAME

6       comedi_digital_trigger_enable_levels - set digital trigger level
7       detection
8

SYNOPSIS

10       #include <comedilib.h>
11
12       int comedi_digital_trigger_enable_levels(comedi_t * device,
13                                                unsigned int subdevice,
14                                                unsigned int trigger_id,
15                                                unsigned int base_input,
16                                                unsigned int high_level_inputs,
17                                                unsigned int low_level_inputs);
18

STATUS

20       alpha
21

DESCRIPTION

23       This function enables level detection for a digital trigger on a
24       subdevice. If the subdevice supports several digital triggers, the
25       trigger_id selects one. The high_level_inputs and low_level_inputs
26       parameters are bit fields that enable (1) or disable (0) high and low
27       level detection on a set of (up to) 32 inputs. The least-significant
28       bit corresponds to the input specified by the base_input parameter,
29       with subsequent bits corresponding to subsequent inputs.
30
31       Successive calls to this function have an cumulative effect, which
32       allows digital triggers to be set up for more than 32 inputs. There may
33       also be a cumulative effect with calls to
34       comedi_digital_trigger_enable_edges if the digital trigger supports a
35       combination of edge and level triggering. Due to the cumulative effect,
36       it may be necessary to call comedi_digital_trigger_disable to clear the
37       old settings before reconfiguring the digital trigger inputs.
38
39       A digital trigger may support edge detection, level detection, both at
40       different times, or both at the same time. If it supports both but not
41       at the same time, configuring level triggers will disable any previous
42       edge triggers, or vice versa.
43
44       This function is only useable on subdevices that provide support for
45       the INSN_CONFIG_DIGITAL_TRIG configuration instruction, and only if the
46       digital trigger supports level detection.
47

RETURN VALUE

49       0 on success, -1 on error.
50

AUTHORS

52       David Schleef <ds@schleef.org>
53           Author.
54
55       Frank Mori Hess <fmhess@users.sourceforge.net>
56           Author.
57
58       Herman Bruyninckx <Herman.Bruyninckx@mech.kuleuven.ac.be>
59           Author.
60
61       Bernd Porr <tech@linux-usb-daq.co.uk>
62           Author.
63
64       Ian Abbott <abbotti@mev.co.uk>
65           Author.
66
67       Éric Piel <piel@delmic.com>
68           Author.
69
71       Copyright © 1998-2003 David Schleef
72       Copyright © 2001-2003, 2005, 2008 Frank Mori Hess
73       Copyright © 2002-2003 Herman Bruyninckx
74       Copyright © 2012 Bernd Porr
75       Copyright © 2012 Ian Abbott
76       Copyright © 2012, 2015 Éric Piel
77
78       This document is part of Comedilib. In the context of this document,
79       the term "source code" as defined by the license is interpreted as the
80       XML source.
81
82       This library is free software; you can redistribute it and/or modify it
83       under the terms of the GNU Lesser General Public License as published
84       by the Free Software Foundation, version 2.1 of the License.
85
86       This library is distributed in the hope that it will be useful, but
87       WITHOUT ANY WARRANTY; without even the implied warranty of
88       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
89       General Public License for more details.
90
91       You should have received a copy of the GNU Lesser General Public
92       License along with this library; if not, write to the Free Software
93       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
94       USA.
95
96
97
98
99Comedi                            05/11/2017           COMEDI_DIGITAL_TRIGG(3)
Impressum