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.?
29 ID=2: open drain input (?)
30 ID=3: open drain output
33 chanspec is used to specify channel
36 These are used to configure the direction of digital I/O lines.
43 - does "open drain input" make sense? (no)
46 ID=xxx: analog output waveform generation
48 Specify the number of samples in buffer.
51 ID=xxx: analog output deglitch configuration
52 ID=xxx: analog input dithering configuration
54 Also could put AO range configuration here. (ds: that would be
58 ID=xxx: analog triggering
65 [1] - analog trigger channel
79 - are there devices that can specify debouncing?
80 - are there devices that can specify a time value after
81 which the analog trigger resets?
82 - has to account for hysteresis
85 ID=xxx: simple digital triggering
99 - should this configure pins, or configure triggers?
100 (ds: triggers, see independent subdevice design rule)
101 (ds: pins, because it makes other things easier)
102 - divider? (ds: too complicated. This is supposed to
104 - should this be encoded into the TRIG_EXT argument?
107 ID=xxx: extended digital triggering
118 - should this be the same as triggering for counter/timers?
121 ID=xxx: counter configuration
123 The subdevice has an accumulator which changes based on
128 generate command trigger when?
145 acc+=atan(source1,source2)
148 - configuring pins vs. configuring triggers would make this
152 ID=xxx: counter configuration, up counter
154 chanspec: used to determine particular counter channel
159 [2] - src (like command trigger)
163 - too simple? no gating
165 ID=xxx: counter configuration, up counter with gating
166 ID=xxx: counter configuration, quadrature
169 ID=xxx: command trigger, pattern matching
172 [1] - bit mask (1 - watch, 0 - don't watch)
176 ID=xxx: set software gate
186 (STC: simple event counting)
189 primary source - external line (+/-)
191 - Pulse counting with gate:
192 (STC: simple gated event counting)
195 primary source - external line
196 gate source - external line
198 - Pulse length measurement:
199 (STC: single pulse-width measurement)
201 mode - up counter with gate
202 primary source - timer
203 gate source - external line (+/-)
205 latch and reset on gate (-) transition
208 (STC: buffered [non-]cumulative event counting,
209 single period measurement)
212 primary source - timer
213 secondary source - external line
215 latch on secondary source (+) transition
218 (STC: relative position sensing)
220 mode - up/down counter
221 primary source - external line
222 secondary source - external line
226 - Quadrature counting:
229 primary source - external line 1
230 secondary source - external line 2
232 - Frequency generation:
235 primary source - timer
237 invert output on primary source trigger
242 mode - dual up counter
243 primary source - timer
244 secondary source - timer
246 set output on primary source trigger
247 clear output on secondary source trigger
249 - Pulse Width Modulation
252 secondary source - timer (latch arg)
254 - Frequency Shift Keying:
256 mode - double up counter
257 primary source - timer
258 secondary source - timer
259 gate - soft, or external line
261 invert output on gate?primary:secondary source trigger