COMEDI_DIGITAL_TRIGG(3)
π COMEDI_DIGITAL_TRIGG π (Comedi reference, bestie)
okay so we're doing a manpage and it's comedi_digital_trigger_enable_levels from the Comedi reference and honestly? it's giving niche-but-iconic. sit down, grab a lil snack π, and let's get into it.
β¨ NAME β¨
comedi_digital_trigger_enable_levels β set digital trigger level detection πΈ
π SYNOPSIS π
#include <comedilib.h>
int comedi_digital_trigger_enable_levels(comedi_t * device,
unsigned int subdevice,
unsigned int trigger_id,
unsigned int base_input,
unsigned int high_level_inputs,
unsigned int low_level_inputs);
π STATUS π
alpha. yes bestie, that's the actual status in the original. treating it like it's fully cooked is not the move.
π DESCRIPTION π
so what does this thing actually do? it enables level detection for a digital trigger on a subdevice π . literally that's the whole job.
if your subdevice supports several digital triggers, the trigger_id picks which one you're talking about. you're welcome.
now the part where people get confused, so listen up π«Ά: high_level_inputs and low_level_inputs are bit fields. each bit tells you whether to enable (1) or disable (0) high and low level detection on a set of up to 32 inputs. the least-significant bit lines up with the input named by the base_input parameter, and then, like, each subsequent bit goes with each subsequent input. in order. no cap.
the cumulative behavior is the plot twist here β successive calls to this function have a cumulative effect, which is how you can set up digital triggers for more than 32 inputs. it may also stack cumulatively with calls to comedi_digital_trigger_enable_edges, but only if the digital trigger supports a combination of edge and level triggering. and because of all that stacking, it may be necessary to call comedi_digital_trigger_disable to clear the old settings before you reconfigure the digital trigger inputs. so likeβ¦ clean your room before you redecorate π§Ήβ¨
a digital trigger may support:
- edge detection
- level detection
- both, at different times
- both, at the same time
and if it supports both but not at the same time? then configuring level triggers will disable any previous edge triggers, or vice versa. it's giving "you can't have both at once, pick a lane." π
β οΈ important caveat, don't skip this: this function is only useable on subdevices that provide support for the INSN_CONFIG_DIGITAL_TRIG configuration instruction, and only if the digital trigger supports level detection. if it doesn't, you're out of luck, bestie. π
π₯ RETURN VALUE π₯
0on success π-1on error π
that's it. that's the whole vibe check.
π AUTHORS π
- 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.
the way that six whole people put their names on thisβ¦ main character ensemble energy fr fr π
π 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.
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.
okay that's the whole page, we ate, we left no crumbs. π this one came out of the Comedi source, dated 03/20/2026, and it lives at the top as COMEDI_DIGITAL_TRIGG(3) β so if you see that header up there, yeah, it's us. bye bestie, go enable some levels π¦πΈ
π¦ 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