summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorSpencer E. Olson <olsonse@umich.edu>2018-10-03 14:56:03 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-09 15:34:51 +0200
commitba932fcfee28b6a23bb8a903ce5a2210ac861721 (patch)
treeeec064afaf199c02dcf0768a7f200b6117dee29d /drivers/staging/comedi
parentd7569ad766511fe708a8bd7476baa305d1510daf (diff)
staging: comedi: ni_routing: Add NI signal routing info
See README for a thorough discussion of this content. Adds tables of all register values for routing various signals to various terminals on National Instruments hardware. This information is directly compared to and taken from register-level programming documentation and/or register-level programming examples as provided by National Instruments. Furthermore, this information was mostly compared (favorably) to the register values already used in the comedi drivers for NI hardware. Adds tables of valid routes for many devices. This information is not consistent from device to device, nor entirely consistent within device families. One additional major challenge is that this information does not seem to be obtainable in any programmatic fashion, neither through the proprietary NIDAQmx(-base) c-libraries, nor with register level programming, _nor_ through any documentation. In fact, the only consistent source of this information is through the proprietary NI-MAX software, which currently only runs on Windows platforms. A further challenge is that this information cannot be exported from NI-MAX, except by screenshot. The collection and maintenance of this information is somewhat tedious and requires frequent re-examination and comparison of NI-MAX and/or the NI-MHDDK documentation (register programming information) and NI-MHDDK examples. Tools are added with this patch to facilitate generating CSV files from the data tables. These CSV files can be used with a spreadsheet program to provide better visual comparision with screenshots gathered from NI-MAX. Tools are also added to regenerate the data tables from CSV content--this greatly enhances updating data tables with large changes (such as when adding devices). Signed-off-by: Spencer E. Olson <olsonse@umich.edu> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/README240
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes.c51
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes.h32
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/all.h54
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6070e.c639
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6220.c1418
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6221.c1602
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6229.c1602
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6251.c1652
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6254.c1464
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6259.c1652
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6534.c290
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6602.c3378
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6713.c400
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6723.c400
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6733.c428
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6030e.c608
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6224.c1432
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6225.c1613
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6251.c1655
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxi-6733.c428
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxie-6251.c1656
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxie-6535.c575
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pxie-6738.c3083
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_route_values.c42
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_route_values.h98
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_route_values/all.h37
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_route_values/ni_660x.c650
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_route_values/ni_eseries.c602
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/ni_route_values/ni_mseries.c1752
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/tools/.gitignore7
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/tools/Makefile79
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/tools/convert_c_to_py.c159
-rwxr-xr-xdrivers/staging/comedi/drivers/ni_routing/tools/convert_csv_to_c.py503
-rwxr-xr-xdrivers/staging/comedi/drivers/ni_routing/tools/convert_py_to_csv.py67
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/tools/csv_collection.py40
-rwxr-xr-xdrivers/staging/comedi/drivers/ni_routing/tools/make_blank_csv.py32
-rw-r--r--drivers/staging/comedi/drivers/ni_routing/tools/ni_names.py56
38 files changed, 30476 insertions, 0 deletions
diff --git a/drivers/staging/comedi/drivers/ni_routing/README b/drivers/staging/comedi/drivers/ni_routing/README
new file mode 100644
index 000000000000..b65c4ebedbc4
--- /dev/null
+++ b/drivers/staging/comedi/drivers/ni_routing/README
@@ -0,0 +1,240 @@
+Framework for Maintaining Common National Instruments Terminal/Signal names
+
+The contents of this directory are primarily for maintaining and formatting all
+known valid signal routes for various National Instruments devices.
+
+Some background:
+ There have been significant confusions over the past many years for users
+ when trying to understand how to connect to/from signals and terminals on
+ NI hardware using comedi. The major reason for this is that the actual
+ register values were exposed and required to be used by users. Several
+ major reasons exist why this caused major confusion for users:
+
+ 1) The register values are _NOT_ in user documentation, but rather in
+ arcane locations, such as a few register programming manuals that are
+ increasingly hard to find and the NI-MHDDK (comments in in example code).
+ There is no one place to find the various valid values of the registers.
+
+ 2) The register values are _NOT_ completely consistent. There is no way to
+ gain any sense of intuition of which values, or even enums one should use
+ for various registers. There was some attempt in prior use of comedi to
+ name enums such that a user might know which enums should be used for
+ varying purposes, but the end-user had to gain a knowledge of register
+ values to correctly wield this approach.
+
+ 3) The names for signals and registers found in the various register level
+ programming manuals and vendor-provided documentation are _not_ even
+ close to the same names that are in the end-user documentation.
+
+ 4) The sets of routes that are valid are not consistent from device to device.
+ One additional major challenge is that this information does not seem to be
+ obtainable in any programmatic fashion, neither through the proprietary
+ NIDAQmx(-base) c-libraries, nor with register level programming, _nor_
+ through any documentation. In fact, the only consistent source of this
+ information is through the proprietary NI-MAX software, which currently only
+ runs on Windows platforms. A further challenge is that this information
+ cannot be exported from NI-MAX, except by screenshot.
+
+
+
+The content of this directory is part of an effort to greatly simplify the use
+of signal routing capabilities of National Instruments data-acquisition and
+control hardware. In order to facilitate the transfer of register-level
+information _and_ the knowledge of valid routes per device, a few specific
+choices were made:
+
+
+1) The names of the National Instruments signals/terminals that are used in this
+ directory are chosen to be consistent with (a) the NI's user level
+ documentation, (b) NI's user-level code, (c) the information as provided by
+ the proprietary NI-MAX software, and (d) the user interface code provided by
+ the user-land comedilib library.
+
+ The impact of this choice implies that one allows the use of CamelScript names
+ in the kernel. In short, the choice to use CamelScript and the exact names
+ below is for maintainability, clarity, similarity to manufacturer's
+ documentation, _and_ a mitigation for confusion that has plagued the use of
+ these drivers for years!
+
+2) The bulk of the real content for this directory is stored in two separate
+ collections (i.e. sub-directories) of tables stored in c source files:
+
+ (a) ni_route_values/ni_[series-label]series.c
+
+ This data represents all the various register values to use for the
+ multiple different signal MUXes for the specific device families.
+
+ The values are all wrapped in one of three macros to help document and
+ track which values have been implemented and tested.
+ These macros are:
+ V(<value>) : register value is valid, tested, and implemented
+ I(<value>) : register value is implemented but needs testing
+ U(<value>) : register value is not implemented
+
+ The actual function of these macros will depend on whether the code is
+ compiled in the kernel or whether it is compiled into the conversion
+ tools. For the conversion tools, it can be used to indicate the status
+ of the register value. For the kernel, V() and I() both perform the
+ same function and prepare data to be used; U() zeroes out the value to
+ ensure that it cannot be used.
+
+ *** It would be a great help for users to test these values such that
+ these files can be correctly marked/documented ***
+
+ (b) ni_device_routes/[board-name].c
+
+ This data represents the known set of valid signal routes that are
+ possible for each specific board. Although the family defines the
+ register values to use for a particular signal MUX, not all possible
+ signals are actually available on each board.
+
+ In order for a particular board to take advantage of the effort to
+ simplify/clarify signal routing on NI devices, a corresponding
+ [board-name].c file must be created. This file should reflect the known
+ valid _direct_ routing capabilities of the board.
+
+ As noted above, the only known consistent source of information for
+ valid device routes comes from the proprietary National Instruments
+ Windows software, NI-MAX. Also, as noted above, this information can
+ only be visually conveyed from NI-MAX to other media. To make this
+ easier, the naming conventions used in the [board-name].c file are
+ similar to the naming conventions as presented by NI-MAX.
+
+
+3) Two other files aggregate the above data to integrate it into comedi:
+ ni_route_values.c
+ ni_device_routes.c
+
+ When adding a new [board-name].c file, be sure to also add in the line in
+ ni_device_routes.c to include this information into comedi.
+
+
+4) Several tools have been included to convert from/to the c file formats.
+ These tools are best used/demonstrated via the included Makefile targets:
+ (a) `make csv-files`
+ Creates new csv-files using content of c-files of existing
+ ni_routing/* content. New csv files are placed in csv
+ sub-directory.
+
+ As noted above, the only consistent source of information of valid
+ device routes comes from the proprietary National Instruments Windows
+ software, NI-MAX. Also, as noted above, this information can only be
+ visually conveyed from NI-MAX to other media. This make target creates
+ spreadsheet representations of the routing data. The choice of using a
+ spreadsheet (ala CSV) to copy this information allows for easy direct
+ visual comparison to the NI-MAX "Valid Routes" tables.
+
+ Furthermore, the register-level information is much easier to identify and
+ correct when entire families of NI devices are shown side by side in table
+ format. This is made easy by using a file-storage format that can be
+ loaded into a spreadsheet application.
+
+ Finally, .csv content is very easy to edit and read using a variety of
+ tools, including spreadsheets or various other scripting languages. In
+ fact, the tools provided here enable quick conversion of the
+ spreadsheet-like .csv format to c-files that follow the kernel coding
+ conventions.
+
+
+ (b) `make c-files`
+ Creates new c-files using content of csv sub-directory. These
+ new c-files can be compared to the active content in the
+ ni_routing directory.
+ (c) `make csv-blank`
+ Create a new blank csv file. This is useful for establishing a
+ new data table for either a device family (less likely) or a
+ specific board of an existing device family (more likely).
+ (d) `make clean`
+ Remove all generated files/directories.
+ (e) `make everything`
+ Build all csv-files, then all new c-files.
+
+
+
+
+In summary, similar confusion about signal routing configuration, albeit less,
+plagued NI's previous version of their own proprietary drivers. Earlier than
+2003, NI greatly simplified the situation for users by releasing a new API that
+abstracted the names of signals/terminals to a common and intuitive set of
+names. In addition, this new API provided a much more common interface to use
+for most of NI hardware.
+
+Comedi already provides such a common interface for data-acquisition and control
+hardware. This effort complements comedi's abstraction layers by further
+abstracting much more of the use cases for NI hardware, but allowing users _and_
+developers to directly refer to NI documentation (user-level, register-level,
+and the register-level examples of the NI-MHDDK).
+
+
+
+--------------------------------------------------------------------------------
+Various naming conventions and relations:
+--------------------------------------------------------------------------------
+These are various notes that help to relate the naming conventions used in the
+NI-STC with those naming conventions used here.
+--------------------------------------------------------------------------------
+
+ Signal sources for most signals-destinations are given a specific naming
+ convention, although the register values are not consistent. This next table
+ shows the mapping between the names used in comedi for NI and those names
+ typically used within the NI-STC documentation.
+
+ (comedi) (NI-STC input or output) (NOTE)
+ ------------------------------------------------------------------------------
+ TRIGGER_LINE(i) RTSI_Trig_i_Output_Select i in range [0..7]
+ NI_AI_STOP AI_STOP
+ NI_AI_SampleClock AI_START_Select
+ NI_AI_SampleClockTimebase AI_SI If internal sample
+ clock signal is used
+ NI_AI_StartTrigger AI_START1_Select
+ NI_AI_ReferenceTrigger AI_START2_Select for pre-triggered
+ acquisition---not
+ currently supported
+ in comedi
+ NI_AI_ConvertClock AI_CONVERT_Source_Select
+ NI_AI_ConvertClockTimebase AI_SI2 If internal convert
+ signal is used
+ NI_AI_HoldCompleteEvent
+ NI_AI_PauseTrigger AI_External_Gate
+ NI_AO_SampleClock AO_UPDATE
+ NI_AO_SampleClockTimebase AO_UI
+ NI_AO_StartTrigger AO_START1
+ NI_AO_PauseTrigger AO_External_Gate
+ NI_DI_SampleClock
+ NI_DO_SampleClock
+ NI_MasterTimebase
+ NI_20MHzTimebase TIMEBASE 1 && TIMEBASE 3 if no higher clock exists
+ NI_80MHzTimebase TIMEBASE 3
+ NI_100kHzTimebase TIMEBASE 2
+ NI_10MHzRefClock
+ PXI_Clk10
+ NI_CtrOut(0) GPFO_0 external ctr0out pin
+ NI_CtrOut(1) GPFO_1 external ctr1out pin
+ NI_CtrSource(0)
+ NI_CtrSource(1)
+ NI_CtrGate(0)
+ NI_CtrGate(1)
+ NI_CtrInternalOutput(0) G_OUT0, G0_TC for Ctr1Source, Ctr1Gate
+ NI_CtrInternalOutput(1) G_OUT1, G1_TC for Ctr0Source, Ctr0Gate
+ NI_RGOUT0 RGOUT0 internal signal
+ NI_FrequencyOutput
+ #NI_FrequencyOutputTimebase
+ NI_ChangeDetectionEvent
+ NI_RTSI_BRD(0)
+ NI_RTSI_BRD(1)
+ NI_RTSI_BRD(2)
+ NI_RTSI_BRD(3)
+ #NI_SoftwareStrobe
+ NI_LogicLow
+ NI_CtrA(0) G0_A_Select see M-Series user
+ manual (371022K-01)
+ NI_CtrA(1) G1_A_Select see M-Series user
+ manual (371022K-01)
+ NI_CtrB(0) G0_B_Select, up/down see M-Series user
+ manual (371022K-01)
+ NI_CtrB(1) G1_B_Select, up/down see M-Series user
+ manual (371022K-01)
+ NI_CtrZ(0) see M-Series user
+ manual (371022K-01)
+ NI_CtrZ(1) see M-Series user
+ manual (371022K-01)
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes.c
new file mode 100644
index 000000000000..7b6a74dfe48b
--- /dev/null
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes.c
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: GPL-2.0+
+/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
+/*
+ * comedi/drivers/ni_routing/ni_device_routes.c
+ * List of valid routes for specific NI boards.
+ *
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 2016 Spencer E. Olson <olsonse@umich.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ */
+
+/*
+ * The contents of this file are generated using the tools in
+ * comedi/drivers/ni_routing/tools
+ *
+ * Please use those tools to help maintain the contents of this file.
+ */
+
+#include "ni_device_routes.h"
+#include "ni_device_routes/all.h"
+
+struct ni_device_routes *const ni_device_routes_list[] = {
+ &ni_pxi_6030e_device_routes,
+ &ni_pci_6070e_device_routes,
+ &ni_pci_6220_device_routes,
+ &ni_pci_6221_device_routes,
+ &ni_pxi_6224_device_routes,
+ &ni_pxi_6225_device_routes,
+ &ni_pci_6229_device_routes,
+ &ni_pci_6251_device_routes,
+ &ni_pxi_6251_device_routes,
+ &ni_pxie_6251_device_routes,
+ &ni_pci_6254_device_routes,
+ &ni_pci_6259_device_routes,
+ &ni_pci_6534_device_routes,
+ &ni_pci_6602_device_routes,
+ &ni_pci_6713_device_routes,
+ &ni_pci_6723_device_routes,
+ &ni_pci_6733_device_routes,
+ &ni_pxi_6733_device_routes,
+ NULL,
+};
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes.h b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes.h
new file mode 100644
index 000000000000..b9f1c47d19e1
--- /dev/null
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes.h
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
+/*
+ * comedi/drivers/ni_routing/ni_device_routes.c
+ * List of valid routes for specific NI boards.
+ *
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 2016 Spencer E. Olson <olsonse@umich.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ */
+
+/*
+ * This file is meant to be included by comedi/drivers/ni_routes.c
+ */
+
+#ifndef _COMEDI_DRIVERS_NI_ROUTINT_NI_DEVICE_ROUTES_H
+#define _COMEDI_DRIVERS_NI_ROUTINT_NI_DEVICE_ROUTES_H
+
+#include "../ni_routes.h"
+
+extern struct ni_device_routes *const ni_device_routes_list[];
+
+#endif /* _COMEDI_DRIVERS_NI_ROUTINT_NI_DEVICE_ROUTES_H */
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/all.h b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/all.h
new file mode 100644
index 000000000000..78b24138acb7
--- /dev/null
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/all.h
@@ -0,0 +1,54 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
+/*
+ * comedi/drivers/ni_routing/ni_device_routes/all.h
+ * List of valid routes for specific NI boards.
+ *
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 2016 Spencer E. Olson <olsonse@umich.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ */
+
+/*
+ * The contents of this file are generated using the tools in
+ * comedi/drivers/ni_routing/tools
+ *
+ * Please use those tools to help maintain the contents of this file.
+ */
+
+#ifndef _COMEDI_DRIVERS_NI_ROUTING_NI_DEVICE_ROUTES_EXTERN_H
+#define _COMEDI_DRIVERS_NI_ROUTING_NI_DEVICE_ROUTES_EXTERN_H
+
+#include "../ni_device_routes.h"
+
+extern struct ni_device_routes ni_pxi_6030e_device_routes;
+extern struct ni_device_routes ni_pci_6070e_device_routes;
+extern struct ni_device_routes ni_pci_6220_device_routes;
+extern struct ni_device_routes ni_pci_6221_device_routes;
+extern struct ni_device_routes ni_pxi_6224_device_routes;
+extern struct ni_device_routes ni_pxi_6225_device_routes;
+extern struct ni_device_routes ni_pci_6229_device_routes;
+extern struct ni_device_routes ni_pci_6251_device_routes;
+extern struct ni_device_routes ni_pxi_6251_device_routes;
+extern struct ni_device_routes ni_pxie_6251_device_routes;
+extern struct ni_device_routes ni_pci_6254_device_routes;
+extern struct ni_device_routes ni_pci_6259_device_routes;
+extern struct ni_device_routes ni_pci_6534_device_routes;
+extern struct ni_device_routes ni_pxie_6535_device_routes;
+extern struct ni_device_routes ni_pci_6602_device_routes;
+extern struct ni_device_routes ni_pci_6713_device_routes;
+extern struct ni_device_routes ni_pci_6723_device_routes;
+extern struct ni_device_routes ni_pci_6733_device_routes;
+extern struct ni_device_routes ni_pxi_6733_device_routes;
+extern struct ni_device_routes ni_pxie_6738_device_routes;
+
+#endif //_COMEDI_DRIVERS_NI_ROUTING_NI_DEVICE_ROUTES_EXTERN_H
diff --git a/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6070e.c b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6070e.c
new file mode 100644
index 000000000000..f1126a0cb285
--- /dev/null
+++ b/drivers/staging/comedi/drivers/ni_routing/ni_device_routes/pci-6070e.c
@@ -0,0 +1,639 @@
+// SPDX-License-Identifier: GPL-2.0+
+/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
+/*
+ * comedi/drivers/ni_routing/ni_device_routes/pci-6070e.c
+ * List of valid routes for specific NI boards.
+ *
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 2016 Spencer E. Olson <olsonse@umich.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ */
+
+/*
+ * The contents of this file are generated using the tools in
+ * comedi/drivers/ni_routing/tools
+ *
+ * Please use those tools to help maintain the contents of this file.
+ */
+
+#include "../ni_device_routes.h"
+#include "all.h"
+
+struct ni_device_routes ni_pci_6070e_device_routes = {
+ .device = "pci-6070e",
+ .routes = (struct ni_route_set[]){
+ {
+ .dest = NI_PFI(0),
+ .src = (int[]){
+ NI_AI_StartTrigger,
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = NI_PFI(1),
+ .src = (int[]){
+ NI_AI_ReferenceTrigger,
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = NI_PFI(2),
+ .src = (int[]){
+ NI_AI_ConvertClock,
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = NI_PFI(3),
+ .src = (int[]){
+ NI_CtrSource(1),
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = NI_PFI(4),
+ .src = (int[]){
+ NI_CtrGate(1),
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = NI_PFI(5),
+ .src = (int[]){
+ NI_AO_SampleClock,
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = NI_PFI(6),
+ .src = (int[]){
+ NI_AO_StartTrigger,
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = NI_PFI(7),
+ .src = (int[]){
+ NI_AI_SampleClock,
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = NI_PFI(8),
+ .src = (int[]){
+ NI_CtrSource(0),
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = NI_PFI(9),
+ .src = (int[]){
+ NI_CtrGate(0),
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = TRIGGER_LINE(0),
+ .src = (int[]){
+ NI_CtrSource(0),
+ NI_CtrGate(0),
+ NI_CtrInternalOutput(0),
+ NI_CtrOut(0),
+ NI_AI_SampleClock,
+ NI_AI_StartTrigger,
+ NI_AI_ReferenceTrigger,
+ NI_AI_ConvertClock,
+ NI_AO_SampleClock,
+ NI_AO_StartTrigger,
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = TRIGGER_LINE(1),
+ .src = (int[]){
+ NI_CtrSource(0),
+ NI_CtrGate(0),
+ NI_CtrInternalOutput(0),
+ NI_CtrOut(0),
+ NI_AI_SampleClock,
+ NI_AI_StartTrigger,
+ NI_AI_ReferenceTrigger,
+ NI_AI_ConvertClock,
+ NI_AO_SampleClock,
+ NI_AO_StartTrigger,
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = TRIGGER_LINE(2),
+ .src = (int[]){
+ NI_CtrSource(0),
+ NI_CtrGate(0),
+ NI_CtrInternalOutput(0),
+ NI_CtrOut(0),
+ NI_AI_SampleClock,
+ NI_AI_StartTrigger,
+ NI_AI_ReferenceTrigger,
+ NI_AI_ConvertClock,
+ NI_AO_SampleClock,
+ NI_AO_StartTrigger,
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = TRIGGER_LINE(3),
+ .src = (int[]){
+ NI_CtrSource(0),
+ NI_CtrGate(0),
+ NI_CtrInternalOutput(0),
+ NI_CtrOut(0),
+ NI_AI_SampleClock,
+ NI_AI_StartTrigger,
+ NI_AI_ReferenceTrigger,
+ NI_AI_ConvertClock,
+ NI_AO_SampleClock,
+ NI_AO_StartTrigger,
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = TRIGGER_LINE(4),
+ .src = (int[]){
+ NI_CtrSource(0),
+ NI_CtrGate(0),
+ NI_CtrInternalOutput(0),
+ NI_CtrOut(0),
+ NI_AI_SampleClock,
+ NI_AI_StartTrigger,
+ NI_AI_ReferenceTrigger,
+ NI_AI_ConvertClock,
+ NI_AO_SampleClock,
+ NI_AO_StartTrigger,
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = TRIGGER_LINE(5),
+ .src = (int[]){
+ NI_CtrSource(0),
+ NI_CtrGate(0),
+ NI_CtrInternalOutput(0),
+ NI_CtrOut(0),
+ NI_AI_SampleClock,
+ NI_AI_StartTrigger,
+ NI_AI_ReferenceTrigger,
+ NI_AI_ConvertClock,
+ NI_AO_SampleClock,
+ NI_AO_StartTrigger,
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = TRIGGER_LINE(6),
+ .src = (int[]){
+ NI_CtrSource(0),
+ NI_CtrGate(0),
+ NI_CtrInternalOutput(0),
+ NI_CtrOut(0),
+ NI_AI_SampleClock,
+ NI_AI_StartTrigger,
+ NI_AI_ReferenceTrigger,
+ NI_AI_ConvertClock,
+ NI_AO_SampleClock,
+ NI_AO_StartTrigger,
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = TRIGGER_LINE(7),
+ .src = (int[]){
+ NI_20MHzTimebase,
+ 0, /* Termination */
+ }
+ },
+ {
+ .dest = NI_CtrSource(0),
+ .src = (int[]){
+ NI_PFI(0),
+ NI_PFI(1),
+ NI_PFI(2),
+ NI_PFI(3),