5 The first data element (data[0]) is an ID.
9 Bad ID: EINVAL (should be EIO?)
10 Length is wrong: EINVAL
12 EAGAIN: changed arguments, retry (like command_test)
16 - Should we use the length as an ID? (no, cuz its dumb)
17 - Should there be a generic flags parameter? (no)
18 - Should trigger source configs return a token? (no)
19 - Would it be better to have a special subdevice for trigger
20 configuration? (no, because it goes against the "subdevices
21 are independent" design.)
22 - Should this configure generic triggers and return a token
23 to be put into a command, or configure specific triggers
24 that are tied to start_src, convert_src, etc.?
27 ID=INSN_CONFIG_BLOCK_SIZE: configure size of blocks to transfer during commands
30 [1] - block size in bytes
32 Writes back actual block size to [1]. Acts as query if block size is
35 ID=xxx: counter configuration
37 The subdevice has an accumulator which changes based on
42 generate command trigger when?
59 acc+=atan(source1,source2)
62 - configuring pins vs. configuring triggers would make this
66 ID=xxx: counter configuration, up counter
68 chanspec: used to determine particular counter channel
73 [2] - src (like command trigger)
77 - too simple? no gating
79 ID=xxx: counter configuration, up counter with gating
80 ID=xxx: counter configuration, quadrature
83 ID=xxx: set software gate
91 (STC: simple event counting)
94 primary source - external line (+/-)
96 - Pulse counting with gate:
97 (STC: simple gated event counting)
100 primary source - external line
101 gate source - external line
103 - Pulse length measurement:
104 (STC: single pulse-width measurement)
106 mode - up counter with gate
107 primary source - timer
108 gate source - external line (+/-)
110 latch and reset on gate (-) transition
113 (STC: buffered [non-]cumulative event counting,
114 single period measurement)
117 primary source - timer
118 secondary source - external line
120 latch on secondary source (+) transition
123 (STC: relative position sensing)
125 mode - up/down counter
126 primary source - external line
127 secondary source - external line
131 - Quadrature counting:
134 primary source - external line 1
135 secondary source - external line 2
137 - Frequency generation:
140 primary source - timer
142 invert output on primary source trigger
147 mode - dual up counter
148 primary source - timer
149 secondary source - timer
151 set output on primary source trigger
152 clear output on secondary source trigger
154 - Pulse Width Modulation
157 secondary source - timer (latch arg)
159 - Frequency Shift Keying:
161 mode - double up counter
162 primary source - timer
163 secondary source - timer
164 gate - soft, or external line
166 invert output on gate?primary:secondary source trigger
169 ID=INSN_CONFIG_ALT_SOURCE: Select alternate input source. This is
170 used by comedi_calibrate to configure an
171 analog input channel which can be redirected to read internal calibration
173 You need to set the CR_ALT_SOURCE flag in the chanlist/chanspec when
174 reading to read from the configured alternate input source.
179 ID=INSN_CONFIG_SET_ROUTING: This is used to configure an output channel
180 which can be multiplexed to output a variety of
181 different signals (such as NI's RTSI and PFI lines).
183 chanspec: channel whose routing is being configured
188 ID=INSN_CONFIG_GET_ROUTING: Queries the routing configuration. See
189 INSN_CONFIG_SET_ROUTING.
191 chanspec: channel whose routing is being queried
196 ID=INSN_CONFIG_TIMER_1: Deprecated. Use INSN_CONFIG_SET_CLOCK_SRC and
197 TRIG_COUNT or TRIG_TIMER.
198 Configure an external master clock and divisor
199 to divide clock by. Used with commands by setting scan_begin_src or
200 convert_src set to TRIG_OTHER.
203 [1] - trigger configuration (COMEDI_EV_SCAN_BEGIN, COMEDI_EV_CONVERT, etc.)
204 [2] - primary input chanspec (also specifies polarity and edge/level )
205 [3] - primary combining machine configuration (should always be 0x04)
209 ID=INSN_CONFIG_PWM_OUTPUT: Configure a pulse-width-modulated output. Returns
210 EAGAIN error with modified values if exact timing is not achievable.
213 [1] - up time flags (rounding mode for time: TRIG_ROUND_NEAREST, etc.)
214 [2] - up time (nanoseconds)
215 [3] - down time flags (rounding mode for time: TRIG_ROUND_NEAREST, etc.)
216 [4] - down time (nanoseconds)
218 ID=INSN_CONFIG_GET_PWM_OUTPUT: Query a pulse-width-modulation output.
221 [1] - up time (nanoseconds)
222 [2] - down time (nanoseconds)
224 ID=INSN_CONFIG_SET_CLOCK_SRC: Choose a source for the master clock.
225 The frequency of the clock is specified in data[2], or left
226 unspecified by using a value of 0. The driver will ignore the clock
227 period setting if it already knows what the clock period should be
228 for the specified source (i.e. for an internal master clock). Certain
229 boards which use a phase-locked loop to synchronize to an external
230 clock source must be told the frequency of the external clock.
231 Specifying a clock period for an external clock may also allow
232 the driver to support TRIG_TIMER sources in commands while
233 using the external clock.
236 [2] - clock period (nanoseconds)
238 ID=INSN_CONFIG_GET_CLOCK_SRC: Ask which master clock is being used
241 [2] - clock period (nanoseconds)
243 ID=INSN_CONFIG_SET_GATE_SRC: Select gate source.
245 [1] - index identifying which gate we are configuring (0 if there is only one gate)
248 ID=INSN_CONFIG_GET_GATE_SRC: Query gate
249 chanspec - the gate whose source is being queried (if the subdevice has multiple gates)
251 [1] - index identifying which gate we are querying (0 if there is only one gate)
254 ID=INSN_CONFIG_ARM: Arm a device (such as a counter) to start on the specified source
258 ID=INSN_CONFIG_DISARM: Disarm a device (such as a counter) and force it to stop.
261 ID=INSN_CONFIG_RESET_COUNT: Resets a counter's count to zero. On NI general-purpose
262 counters, it also has the side-effect of disarming the counter.
265 ID=INSN_CONFIG_SET_COUNTER_MODE: Set a counter's mode. The specific meaning of the
266 the mode field is hardware-dependent.
270 ID=INSN_CONFIG_FILTER: Select an input filter.