ENUM COMEDI_DIGITAL_TRIG_OP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ enum comedi_digital_trig_op(9) ✨

Okay bestie, so this is a page from the Linux kernel API manual β€” the enum comedi_digital_trig_op one πŸ’… β€” and it's literally all about the operations you use to configure a digital trigger. Grab a strawberry drink πŸ“ and let's get into it.


🌸 NAME 🌸

enum comedi_digital_trig_op β€” the operations for configuring a digital trigger. That's it, that's the whole vibe check πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

enum comedi_digital_trig_op {
    COMEDI_DIGITAL_TRIG_DISABLE ,
    COMEDI_DIGITAL_TRIG_ENABLE_EDGES ,
    COMEDI_DIGITAL_TRIG_ENABLE_LEVELS

};

πŸ‘‘ Constants πŸ‘‘

  • COMEDI_DIGITAL_TRIG_DISABLE β€” puts the digital trigger right back into its default, inactive, unconfigured state. Like logging out and clearing your cache, no cap ✨
  • COMEDI_DIGITAL_TRIG_ENABLE_EDGES β€” sets rising and/or falling edge inputs, and each one of them can fire the trigger πŸ”₯
  • COMEDI_DIGITAL_TRIG_ENABLE_LEVELS β€” sets a combination of high and/or low level inputs that can fire the trigger 🌈

πŸ’– Description πŸ’–

So these enum values get used with the INSN_CONFIG_DIGITAL_TRIG configuration instruction. And the data for that configuration instruction goes like this, bestie β€” literally in this exact order:

data[0] = INSN_CONFIG_DIGITAL_TRIG

data[1] = trigger ID

data[2] = configuration operation

data[3] = configuration parameter 1

data[4] = configuration parameter 2

data[5] = configuration parameter 3

The trigger ID (data[1]) is what differentiates multiple digital triggers that all belong to the same subdevice β€” like name tags at a party, iykyk 🫢 The configuration operation (data[2]) is one of the enum comedi_digital_trig_op values. And the configuration parameters (data[3], data[4], and data[5]) depend on which operation you're doing β€” they are not used with COMEDI_DIGITAL_TRIG_DISABLE, so don't even worry about them there πŸ™ˆ

For COMEDI_DIGITAL_TRIG_ENABLE_EDGES and COMEDI_DIGITAL_TRIG_ENABLE_LEVELS, configuration parameter 1 (data[3]) contains a "left-shift" value that specifies the input corresponding to bit 0 of configuration parameters 2 and 3. That's highkey useful if your trigger has more than 32 inputs πŸ‘‘

For COMEDI_DIGITAL_TRIG_ENABLE_EDGES, configuration parameter 2 (data[4]) specifies which of up to 32 inputs have rising-edge sensitivity, and configuration parameter 3 (data[5]) specifies which of up to 32 inputs have falling-edge sensitivity that can fire the trigger 🌸

For COMEDI_DIGITAL_TRIG_ENABLE_LEVELS, configuration parameter 2 (data[4]) specifies which of up to 32 inputs must be at a high level, and configuration parameter 3 (data[5]) specifies which of up to 32 inputs must be at a low level for the trigger to fire ⭐

Some sequences of INSN_CONFIG_DIGITAL_TRIG instructions may have a (partly) accumulative effect β€” it depends on the low-level driver. Which is genuinely so useful when you're setting up a trigger that has more than 32 inputs, or has a combination of edge- and level-triggered inputs. Situational, but iconic πŸ’…

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/uapi/linux/comedi.h

  • enum comedi_subdevice_type(9)
  • enum comedi_io_direction(9)
  • enum configuration_ids(9)
  • enum comedi_support_level(9)
  • enum comedi_counter_status_flags(9)
  • struct comedi_insn(9)
  • struct comedi_insnlist(9)
  • struct comedi_cmd(9)
  • struct comedi_chaninfo(9)
  • struct comedi_rangeinfo(9)
  • struct comedi_krange(9)
  • struct comedi_subdinfo(9)
  • struct comedi_devinfo(9)
  • struct comedi_devconfig(9)
  • struct comedi_bufconfig(9)
  • struct comedi_bufinfo(9)

Okay that's the whole page, you ate that 🧚 This gem lives in ./include/uapi/linux, dated October 2026, and it's the enum comedi_digital_trig_op(9) page β€” go forth and configure those triggers, periodt πŸ’œ

πŸ“¦ where this page comes from