1COMEDI_SET_FILTER(3) Comedi reference COMEDI_SET_FILTER(3)
2
3
4
6 comedi_set_filter - select a filter for a subdevice
7
9 #include <comedilib.h>
10
11 int comedi_set_filter(comedi_t * device, unsigned int subdevice,
12 unsigned int channel, unsigned int filter);
13
15 alpha
16
18 This function selects a filter for a subdevice. For instance, a digital
19 input subdevice may provide deglitching filters with varying cutoff
20 frequencies. The filters are used to prevent high-frequency noise from
21 causing unwanted transitions on the digital inputs. This function can
22 tell the hardware which deglitching filter to use, or to use none at
23 all.
24
25 The filter parameter selects which of the subdevice's filters to use,
26 and is driver-dependant.
27
28 This function is only useable on subdevices that provide support for
29 the INSN_CONFIG_FILTER configuration instruction.
30
32 0 on success, -1 on error.
33
35 David Schleef <ds@schleef.org>
36 Author.
37
38 Frank Mori Hess <fmhess@users.sourceforge.net>
39 Author.
40
41 Herman Bruyninckx <Herman.Bruyninckx@mech.kuleuven.ac.be>
42 Author.
43
44 Bernd Porr <tech@linux-usb-daq.co.uk>
45 Author.
46
47 Ian Abbott <abbotti@mev.co.uk>
48 Author.
49
50 Éric Piel <piel@delmic.com>
51 Author.
52
54 Copyright © 1998-2003 David Schleef
55 Copyright © 2001-2003, 2005, 2008 Frank Mori Hess
56 Copyright © 2002-2003 Herman Bruyninckx
57 Copyright © 2012 Bernd Porr
58 Copyright © 2012 Ian Abbott
59 Copyright © 2012, 2015 Éric Piel
60
61 This document is part of Comedilib. In the context of this document,
62 the term "source code" as defined by the license is interpreted as the
63 XML source.
64
65 This library is free software; you can redistribute it and/or modify it
66 under the terms of the GNU Lesser General Public License as published
67 by the Free Software Foundation, version 2.1 of the License.
68
69 This library is distributed in the hope that it will be useful, but
70 WITHOUT ANY WARRANTY; without even the implied warranty of
71 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
72 General Public License for more details.
73
74 You should have received a copy of the GNU Lesser General Public
75 License along with this library; if not, write to the Free Software
76 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
77 USA.
78
79
80
81
82Comedi 05/11/2017 COMEDI_SET_FILTER(3)