1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  *  comedi/drivers/ni_routing/ni_device_routes/pxi-6030e.c
4  *  List of valid routes for specific NI boards.
5  *
6  *  COMEDI - Linux Control and Measurement Device Interface
7  *  Copyright (C) 2016 Spencer E. Olson <olsonse@umich.edu>
8  *
9  *  This program is free software; you can redistribute it and/or modify
10  *  it under the terms of the GNU General Public License as published by
11  *  the Free Software Foundation; either version 2 of the License, or
12  *  (at your option) any later version.
13  *
14  *  This program is distributed in the hope that it will be useful,
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *  GNU General Public License for more details.
18  */
19 
20 /*
21  * The contents of this file are generated using the tools in
22  * comedi/drivers/ni_routing/tools
23  *
24  * Please use those tools to help maintain the contents of this file.
25  */
26 
27 #include "../ni_device_routes.h"
28 #include "all.h"
29 
30 struct ni_device_routes ni_pxi_6030e_device_routes = {
31 	.device = "pxi-6030e",
32 	.routes = (struct ni_route_set[]){
33 		{
34 			.dest = NI_PFI(0),
35 			.src = (int[]){
36 				NI_AI_StartTrigger,
37 				0, /* Termination */
38 			}
39 		},
40 		{
41 			.dest = NI_PFI(1),
42 			.src = (int[]){
43 				NI_AI_ReferenceTrigger,
44 				0, /* Termination */
45 			}
46 		},
47 		{
48 			.dest = NI_PFI(2),
49 			.src = (int[]){
50 				NI_AI_ConvertClock,
51 				0, /* Termination */
52 			}
53 		},
54 		{
55 			.dest = NI_PFI(3),
56 			.src = (int[]){
57 				NI_CtrSource(1),
58 				0, /* Termination */
59 			}
60 		},
61 		{
62 			.dest = NI_PFI(4),
63 			.src = (int[]){
64 				NI_CtrGate(1),
65 				0, /* Termination */
66 			}
67 		},
68 		{
69 			.dest = NI_PFI(5),
70 			.src = (int[]){
71 				NI_AO_SampleClock,
72 				0, /* Termination */
73 			}
74 		},
75 		{
76 			.dest = NI_PFI(6),
77 			.src = (int[]){
78 				NI_AO_StartTrigger,
79 				0, /* Termination */
80 			}
81 		},
82 		{
83 			.dest = NI_PFI(7),
84 			.src = (int[]){
85 				NI_AI_SampleClock,
86 				0, /* Termination */
87 			}
88 		},
89 		{
90 			.dest = NI_PFI(8),
91 			.src = (int[]){
92 				NI_CtrSource(0),
93 				0, /* Termination */
94 			}
95 		},
96 		{
97 			.dest = NI_PFI(9),
98 			.src = (int[]){
99 				NI_CtrGate(0),
100 				0, /* Termination */
101 			}
102 		},
103 		{
104 			.dest = TRIGGER_LINE(0),
105 			.src = (int[]){
106 				NI_CtrSource(0),
107 				NI_CtrGate(0),
108 				NI_CtrInternalOutput(0),
109 				NI_CtrOut(0),
110 				NI_AI_SampleClock,
111 				NI_AI_StartTrigger,
112 				NI_AI_ReferenceTrigger,
113 				NI_AI_ConvertClock,
114 				NI_AO_SampleClock,
115 				NI_AO_StartTrigger,
116 				0, /* Termination */
117 			}
118 		},
119 		{
120 			.dest = TRIGGER_LINE(1),
121 			.src = (int[]){
122 				NI_CtrSource(0),
123 				NI_CtrGate(0),
124 				NI_CtrInternalOutput(0),
125 				NI_CtrOut(0),
126 				NI_AI_SampleClock,
127 				NI_AI_StartTrigger,
128 				NI_AI_ReferenceTrigger,
129 				NI_AI_ConvertClock,
130 				NI_AO_SampleClock,
131 				NI_AO_StartTrigger,
132 				0, /* Termination */
133 			}
134 		},
135 		{
136 			.dest = TRIGGER_LINE(2),
137 			.src = (int[]){
138 				NI_CtrSource(0),
139 				NI_CtrGate(0),
140 				NI_CtrInternalOutput(0),
141 				NI_CtrOut(0),
142 				NI_AI_SampleClock,
143 				NI_AI_StartTrigger,
144 				NI_AI_ReferenceTrigger,
145 				NI_AI_ConvertClock,
146 				NI_AO_SampleClock,
147 				NI_AO_StartTrigger,
148 				0, /* Termination */
149 			}
150 		},
151 		{
152 			.dest = TRIGGER_LINE(3),
153 			.src = (int[]){
154 				NI_CtrSource(0),
155 				NI_CtrGate(0),
156 				NI_CtrInternalOutput(0),
157 				NI_CtrOut(0),
158 				NI_AI_SampleClock,
159 				NI_AI_StartTrigger,
160 				NI_AI_ReferenceTrigger,
161 				NI_AI_ConvertClock,
162 				NI_AO_SampleClock,
163 				NI_AO_StartTrigger,
164 				0, /* Termination */
165 			}
166 		},
167 		{
168 			.dest = TRIGGER_LINE(4),
169 			.src = (int[]){
170 				NI_CtrSource(0),
171 				NI_CtrGate(0),
172 				NI_CtrInternalOutput(0),
173 				NI_CtrOut(0),
174 				NI_AI_SampleClock,
175 				NI_AI_StartTrigger,
176 				NI_AI_ReferenceTrigger,
177 				NI_AI_ConvertClock,
178 				NI_AO_SampleClock,
179 				NI_AO_StartTrigger,
180 				0, /* Termination */
181 			}
182 		},
183 		{
184 			.dest = TRIGGER_LINE(5),
185 			.src = (int[]){
186 				NI_CtrSource(0),
187 				NI_CtrGate(0),
188 				NI_CtrInternalOutput(0),
189 				NI_CtrOut(0),
190 				NI_AI_SampleClock,
191 				NI_AI_StartTrigger,
192 				NI_AI_ReferenceTrigger,
193 				NI_AI_ConvertClock,
194 				NI_AO_SampleClock,
195 				NI_AO_StartTrigger,
196 				0, /* Termination */
197 			}
198 		},
199 		{
200 			.dest = TRIGGER_LINE(7),
201 			.src = (int[]){
202 				NI_20MHzTimebase,
203 				0, /* Termination */
204 			}
205 		},
206 		{
207 			.dest = NI_CtrSource(0),
208 			.src = (int[]){
209 				NI_PFI(0),
210 				NI_PFI(1),
211 				NI_PFI(2),
212 				NI_PFI(3),
213 				NI_PFI(4),
214 				NI_PFI(5),
215 				NI_PFI(6),
216 				NI_PFI(7),
217 				NI_PFI(8),
218 				NI_PFI(9),
219 				TRIGGER_LINE(0),
220 				TRIGGER_LINE(1),
221 				TRIGGER_LINE(2),
222 				TRIGGER_LINE(3),
223 				TRIGGER_LINE(4),
224 				TRIGGER_LINE(5),
225 				TRIGGER_LINE(7),
226 				NI_MasterTimebase,
227 				NI_20MHzTimebase,
228 				NI_100kHzTimebase,
229 				NI_AnalogComparisonEvent,
230 				0, /* Termination */
231 			}
232 		},
233 		{
234 			.dest = NI_CtrSource(1),
235 			.src = (int[]){
236 				NI_PFI(0),
237 				NI_PFI(1),
238 				NI_PFI(2),
239 				NI_PFI(3),
240 				NI_PFI(4),
241 				NI_PFI(5),
242 				NI_PFI(6),
243 				NI_PFI(7),
244 				NI_PFI(8),
245 				NI_PFI(9),
246 				TRIGGER_LINE(0),
247 				TRIGGER_LINE(1),
248 				TRIGGER_LINE(2),
249 				TRIGGER_LINE(3),
250 				TRIGGER_LINE(4),
251 				TRIGGER_LINE(5),
252 				TRIGGER_LINE(7),
253 				NI_MasterTimebase,
254 				NI_20MHzTimebase,
255 				NI_100kHzTimebase,
256 				NI_AnalogComparisonEvent,
257 				0, /* Termination */
258 			}
259 		},
260 		{
261 			.dest = NI_CtrGate(0),
262 			.src = (int[]){
263 				NI_PFI(0),
264 				NI_PFI(1),
265 				NI_PFI(2),
266 				NI_PFI(3),
267 				NI_PFI(4),
268 				NI_PFI(5),
269 				NI_PFI(6),
270 				NI_PFI(7),
271 				NI_PFI(8),
272 				NI_PFI(9),
273 				TRIGGER_LINE(0),
274 				TRIGGER_LINE(1),
275 				TRIGGER_LINE(2),
276 				TRIGGER_LINE(3),
277 				TRIGGER_LINE(4),
278 				TRIGGER_LINE(5),
279 				NI_CtrInternalOutput(1),
280 				NI_AI_StartTrigger,
281 				NI_AI_ReferenceTrigger,
282 				NI_AnalogComparisonEvent,
283 				0, /* Termination */
284 			}
285 		},
286 		{
287 			.dest = NI_CtrGate(1),
288 			.src = (int[]){
289 				NI_PFI(0),
290 				NI_PFI(1),
291 				NI_PFI(2),
292 				NI_PFI(3),
293 				NI_PFI(4),
294 				NI_PFI(5),
295 				NI_PFI(6),
296 				NI_PFI(7),
297 				NI_PFI(8),
298 				NI_PFI(9),
299 				TRIGGER_LINE(0),
300 				TRIGGER_LINE(1),
301 				TRIGGER_LINE(2),
302 				TRIGGER_LINE(3),
303 				TRIGGER_LINE(4),
304 				TRIGGER_LINE(5),
305 				NI_CtrInternalOutput(0),
306 				NI_AI_StartTrigger,
307 				NI_AI_ReferenceTrigger,
308 				NI_AnalogComparisonEvent,
309 				0, /* Termination */
310 			}
311 		},
312 		{
313 			.dest = NI_CtrOut(0),
314 			.src = (int[]){
315 				TRIGGER_LINE(0),
316 				TRIGGER_LINE(1),
317 				TRIGGER_LINE(2),
318 				TRIGGER_LINE(3),
319 				TRIGGER_LINE(4),
320 				TRIGGER_LINE(5),
321 				NI_CtrInternalOutput(0),
322 				0, /* Termination */
323 			}
324 		},
325 		{
326 			.dest = NI_CtrOut(1),
327 			.src = (int[]){
328 				NI_CtrInternalOutput(1),
329 				0, /* Termination */
330 			}
331 		},
332 		{
333 			.dest = NI_AI_SampleClock,
334 			.src = (int[]){
335 				NI_PFI(0),
336 				NI_PFI(1),
337 				NI_PFI(2),
338 				NI_PFI(3),
339 				NI_PFI(4),
340 				NI_PFI(5),
341 				NI_PFI(6),
342 				NI_PFI(7),
343 				NI_PFI(8),
344 				NI_PFI(9),
345 				TRIGGER_LINE(0),
346 				TRIGGER_LINE(1),
347 				TRIGGER_LINE(2),
348 				TRIGGER_LINE(3),
349 				TRIGGER_LINE(4),
350 				TRIGGER_LINE(5),
351 				NI_CtrInternalOutput(0),
352 				NI_AI_SampleClockTimebase,
353 				NI_AnalogComparisonEvent,
354 				0, /* Termination */
355 			}
356 		},
357 		{
358 			.dest = NI_AI_SampleClockTimebase,
359 			.src = (int[]){
360 				NI_PFI(0),
361 				NI_PFI(1),
362 				NI_PFI(2),
363 				NI_PFI(3),
364 				NI_PFI(4),
365 				NI_PFI(5),
366 				NI_PFI(6),
367 				NI_PFI(7),
368 				NI_PFI(8),
369 				NI_PFI(9),
370 				TRIGGER_LINE(0),
371 				TRIGGER_LINE(1),
372 				TRIGGER_LINE(2),
373 				TRIGGER_LINE(3),
374 				TRIGGER_LINE(4),
375 				TRIGGER_LINE(5),
376 				TRIGGER_LINE(7),
377 				NI_MasterTimebase,
378 				NI_20MHzTimebase,
379 				NI_100kHzTimebase,
380 				NI_AnalogComparisonEvent,
381 				0, /* Termination */
382 			}
383 		},
384 		{
385 			.dest = NI_AI_StartTrigger,
386 			.src = (int[]){
387 				NI_PFI(0),
388 				NI_PFI(1),
389 				NI_PFI(2),
390 				NI_PFI(3),
391 				NI_PFI(4),
392 				NI_PFI(5),
393 				NI_PFI(6),
394 				NI_PFI(7),
395 				NI_PFI(8),
396 				NI_PFI(9),
397 				TRIGGER_LINE(0),
398 				TRIGGER_LINE(1),
399 				TRIGGER_LINE(2),
400 				TRIGGER_LINE(3),
401 				TRIGGER_LINE(4),
402 				TRIGGER_LINE(5),
403 				NI_CtrInternalOutput(0),
404 				NI_AnalogComparisonEvent,
405 				0, /* Termination */
406 			}
407 		},
408 		{
409 			.dest = NI_AI_ReferenceTrigger,
410 			.src = (int[]){
411 				NI_PFI(0),
412 				NI_PFI(1),
413 				NI_PFI(2),
414 				NI_PFI(3),
415 				NI_PFI(4),
416 				NI_PFI(5),
417 				NI_PFI(6),
418 				NI_PFI(7),
419 				NI_PFI(8),
420 				NI_PFI(9),
421 				TRIGGER_LINE(0),
422 				TRIGGER_LINE(1),
423 				TRIGGER_LINE(2),
424 				TRIGGER_LINE(3),
425 				TRIGGER_LINE(4),
426 				TRIGGER_LINE(5),
427 				NI_AnalogComparisonEvent,
428 				0, /* Termination */
429 			}
430 		},
431 		{
432 			.dest = NI_AI_ConvertClock,
433 			.src = (int[]){
434 				NI_PFI(0),
435 				NI_PFI(1),
436 				NI_PFI(2),
437 				NI_PFI(3),
438 				NI_PFI(4),
439 				NI_PFI(5),
440 				NI_PFI(6),
441 				NI_PFI(7),
442 				NI_PFI(8),
443 				NI_PFI(9),
444 				TRIGGER_LINE(0),
445 				TRIGGER_LINE(1),
446 				TRIGGER_LINE(2),
447 				TRIGGER_LINE(3),
448 				TRIGGER_LINE(4),
449 				TRIGGER_LINE(5),
450 				NI_CtrInternalOutput(0),
451 				NI_AI_ConvertClockTimebase,
452 				NI_AnalogComparisonEvent,
453 				0, /* Termination */
454 			}
455 		},
456 		{
457 			.dest = NI_AI_ConvertClockTimebase,
458 			.src = (int[]){
459 				TRIGGER_LINE(7),
460 				NI_AI_SampleClockTimebase,
461 				NI_MasterTimebase,
462 				NI_20MHzTimebase,
463 				0, /* Termination */
464 			}
465 		},
466 		{
467 			.dest = NI_AI_PauseTrigger,
468 			.src = (int[]){
469 				NI_PFI(0),
470 				NI_PFI(1),
471 				NI_PFI(2),
472 				NI_PFI(3),
473 				NI_PFI(4),
474 				NI_PFI(5),
475 				NI_PFI(6),
476 				NI_PFI(7),
477 				NI_PFI(8),
478 				NI_PFI(9),
479 				TRIGGER_LINE(0),
480 				TRIGGER_LINE(1),
481 				TRIGGER_LINE(2),
482 				TRIGGER_LINE(3),
483 				TRIGGER_LINE(4),
484 				TRIGGER_LINE(5),
485 				NI_AnalogComparisonEvent,
486 				0, /* Termination */
487 			}
488 		},
489 		{
490 			.dest = NI_AI_HoldComplete,
491 			.src = (int[]){
492 				NI_AI_HoldCompleteEvent,
493 				0, /* Termination */
494 			}
495 		},
496 		{
497 			.dest = NI_AO_SampleClock,
498 			.src = (int[]){
499 				NI_PFI(0),
500 				NI_PFI(1),
501 				NI_PFI(2),
502 				NI_PFI(3),
503 				NI_PFI(4),
504 				NI_PFI(5),
505 				NI_PFI(6),
506 				NI_PFI(7),
507 				NI_PFI(8),
508 				NI_PFI(9),
509 				TRIGGER_LINE(0),
510 				TRIGGER_LINE(1),
511 				TRIGGER_LINE(2),
512 				TRIGGER_LINE(3),
513 				TRIGGER_LINE(4),
514 				TRIGGER_LINE(5),
515 				NI_CtrInternalOutput(1),
516 				NI_AO_SampleClockTimebase,
517 				NI_AnalogComparisonEvent,
518 				0, /* Termination */
519 			}
520 		},
521 		{
522 			.dest = NI_AO_SampleClockTimebase,
523 			.src = (int[]){
524 				NI_PFI(0),
525 				NI_PFI(1),
526 				NI_PFI(2),
527 				NI_PFI(3),
528 				NI_PFI(4),
529 				NI_PFI(5),
530 				NI_PFI(6),
531 				NI_PFI(7),
532 				NI_PFI(8),
533 				NI_PFI(9),
534 				TRIGGER_LINE(0),
535 				TRIGGER_LINE(1),
536 				TRIGGER_LINE(2),
537 				TRIGGER_LINE(3),
538 				TRIGGER_LINE(4),
539 				TRIGGER_LINE(5),
540 				TRIGGER_LINE(7),
541 				NI_MasterTimebase,
542 				NI_20MHzTimebase,
543 				NI_100kHzTimebase,
544 				NI_AnalogComparisonEvent,
545 				0, /* Termination */
546 			}
547 		},
548 		{
549 			.dest = NI_AO_StartTrigger,
550 			.src = (int[]){
551 				NI_PFI(0),
552 				NI_PFI(1),
553 				NI_PFI(2),
554 				NI_PFI(3),
555 				NI_PFI(4),
556 				NI_PFI(5),
557 				NI_PFI(6),
558 				NI_PFI(7),
559 				NI_PFI(8),
560 				NI_PFI(9),
561 				TRIGGER_LINE(0),
562 				TRIGGER_LINE(1),
563 				TRIGGER_LINE(2),
564 				TRIGGER_LINE(3),
565 				TRIGGER_LINE(4),
566 				TRIGGER_LINE(5),
567 				NI_AI_StartTrigger,
568 				NI_AnalogComparisonEvent,
569 				0, /* Termination */
570 			}
571 		},
572 		{
573 			.dest = NI_AO_PauseTrigger,
574 			.src = (int[]){
575 				NI_PFI(0),
576 				NI_PFI(1),
577 				NI_PFI(2),
578 				NI_PFI(3),
579 				NI_PFI(4),
580 				NI_PFI(5),
581 				NI_PFI(6),
582 				NI_PFI(7),
583 				NI_PFI(8),
584 				NI_PFI(9),
585 				TRIGGER_LINE(0),
586 				TRIGGER_LINE(1),
587 				TRIGGER_LINE(2),
588 				TRIGGER_LINE(3),
589 				TRIGGER_LINE(4),
590 				TRIGGER_LINE(5),
591 				NI_AnalogComparisonEvent,
592 				0, /* Termination */
593 			}
594 		},
595 		{
596 			.dest = NI_MasterTimebase,
597 			.src = (int[]){
598 				TRIGGER_LINE(7),
599 				NI_20MHzTimebase,
600 				0, /* Termination */
601 			}
602 		},
603 		{ /* Termination of list */
604 			.dest = 0,
605 		},
606 	},
607 };
608