COMEDI_SET_FILTER(3)
β¨ NAME β¨
comedi_set_filter β pick a filter for a subdevice, bestie π
This one lives in the Comedi reference, section 3, and it's literally called COMEDI_SET_FILTER(3) if you're being formal about it.
πΈ SYNOPSIS πΈ
#include <comedilib.h>
int comedi_set_filter(comedi_t * device, unsigned int subdevice,
unsigned int channel, unsigned int filter);
π¦ STATUS π¦
alpha β yeah girl, it's giving "still cooking", keep that in mind π
π DESCRIPTION π
okay so, this function selects a filter for a subdevice. Think about it like this: a digital input subdevice might come with deglitching filters, and those filters have different cutoff frequencies. The whole point of them is to stop high-frequency noise from causing unwanted transitions on your digital inputs β like, noise be trying to make your signal flicker and the filter is the bouncer at the door saying not today πβ¨
So this function tells the hardware which deglitching filter to use... or, if you're feeling unbothered, to use none at all. no filter, no thoughts, head empty π§
The filter parameter picks which of the subdevice's filters you want, and ngl it's driver-dependant β so the vibes differ from driver to driver, check yours.
π Real talk though: this function is only useable on subdevices that provide support for the INSN_CONFIG_FILTER configuration instruction. If your subdevice isn't about that life, this won't work. periodt.
β RETURN VALUE β
0on success β slay, it worked π-1on error β not the vibe π
π AUTHORS π
Iconic people who made this happen, in order:
- David Schleef <
ds@schleef.org> β Author. - Frank Mori Hess <
fmhess@users.sourceforge.net> β Author. - Herman Bruyninckx <
Herman.Bruyninckx@mech.kuleuven.ac.be> β Author. - Bernd Porr <
tech@linux-usb-daq.co.uk> β Author. - Ian Abbott <
abbotti@mev.co.uk> β Author. - Γric Piel <
piel@delmic.com> β Author.
π COPYRIGHT π
Copyright Β© 1998-2003 David Schleef Copyright Β© 2001-2003, 2005, 2008 Frank Mori Hess Copyright Β© 2002-2003 Herman Bruyninckx Copyright Β© 2012 Bernd Porr Copyright Β© 2012 Ian Abbott Copyright Β© 2012, 2015 Γric Piel
This document is part of Comedilib. In the context of this document, the term "source code" as defined by the license is interpreted as the XML source.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 2.1 of the License.
β οΈ This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. (yes bestie, that's the scary all-caps part, it means business π₯)
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
and that's the whole page, bestie π«Ά this was Comedi manual page COMEDI_SET_FILTER(3), dated 03/20/2026 β go forth and deglitch your digital inputs, you absolute main character ππβ¨
π¦ where this page comes from
- ubuntu resolute: libcomedi-dev 0.11.0+5-1.3build6 Β· LGPL-2.1-only
- ubuntu stonking: libcomedi-dev 0.11.0+5-1.3build6 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms