forked from Minki/linux
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>
This commit is contained in:
parent
d7569ad766
commit
ba932fcfee
240
drivers/staging/comedi/drivers/ni_routing/README
Normal file
240
drivers/staging/comedi/drivers/ni_routing/README
Normal file
@ -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)
|
51
drivers/staging/comedi/drivers/ni_routing/ni_device_routes.c
Normal file
51
drivers/staging/comedi/drivers/ni_routing/ni_device_routes.c
Normal file
@ -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,
|
||||
};
|
32
drivers/staging/comedi/drivers/ni_routing/ni_device_routes.h
Normal file
32
drivers/staging/comedi/drivers/ni_routing/ni_device_routes.h
Normal file
@ -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 */
|
@ -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
|
@ -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),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrSource(1),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrGate(0),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(1),
|
||||
NI_AI_StartTrigger,
|
||||
NI_AI_ReferenceTrigger,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrGate(1),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(0),
|
||||
NI_AI_StartTrigger,
|
||||
NI_AI_ReferenceTrigger,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrOut(0),
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(0),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrOut(1),
|
||||
.src = (int[]){
|
||||
NI_CtrInternalOutput(1),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_SampleClock,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(0),
|
||||
NI_AI_SampleClockTimebase,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_SampleClockTimebase,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_StartTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(0),
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_ReferenceTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_ConvertClock,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(0),
|
||||
NI_AI_ConvertClockTimebase,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_ConvertClockTimebase,
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(7),
|
||||
NI_AI_SampleClockTimebase,
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_PauseTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_HoldComplete,
|
||||
.src = (int[]){
|
||||
NI_AI_HoldCompleteEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_SampleClock,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(1),
|
||||
NI_AO_SampleClockTimebase,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_SampleClockTimebase,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_StartTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_AI_StartTrigger,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_PauseTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_MasterTimebase,
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(7),
|
||||
NI_20MHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{ /* Termination of list */
|
||||
.dest = 0,
|
||||
},
|
||||
},
|
||||
};
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,290 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/ni_device_routes/pci-6534.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_6534_device_routes = {
|
||||
.device = "pci-6534",
|
||||
.routes = (struct ni_route_set[]){
|
||||
{
|
||||
.dest = NI_PFI(0),
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_PFI(1),
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_PFI(2),
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_PFI(3),
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_PFI(4),
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_PFI(5),
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_PFI(6),
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_PFI(7),
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(0),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(1),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(2),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(3),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(4),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(5),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(6),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(7),
|
||||
.src = (int[]){
|
||||
NI_20MHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_MasterTimebase,
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(7),
|
||||
NI_20MHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{ /* Termination of list */
|
||||
.dest = 0,
|
||||
},
|
||||
},
|
||||
};
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,400 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/ni_device_routes/pci-6713.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_6713_device_routes = {
|
||||
.device = "pci-6713",
|
||||
.routes = (struct ni_route_set[]){
|
||||
{
|
||||
.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(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_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_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_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_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_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_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_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),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrSource(1),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrGate(0),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(1),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrGate(1),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(0),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrOut(0),
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(0),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrOut(1),
|
||||
.src = (int[]){
|
||||
NI_CtrInternalOutput(1),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_SampleClock,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(1),
|
||||
NI_AO_SampleClockTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_SampleClockTimebase,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_StartTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_PauseTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_MasterTimebase,
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(7),
|
||||
NI_20MHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{ /* Termination of list */
|
||||
.dest = 0,
|
||||
},
|
||||
},
|
||||
};
|
@ -0,0 +1,400 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/ni_device_routes/pci-6723.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_6723_device_routes = {
|
||||
.device = "pci-6723",
|
||||
.routes = (struct ni_route_set[]){
|
||||
{
|
||||
.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(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_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_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_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_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_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_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_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),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrSource(1),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrGate(0),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(1),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrGate(1),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(0),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrOut(0),
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(0),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrOut(1),
|
||||
.src = (int[]){
|
||||
NI_CtrInternalOutput(1),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_SampleClock,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(1),
|
||||
NI_AO_SampleClockTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_SampleClockTimebase,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_StartTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_PauseTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_MasterTimebase,
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(7),
|
||||
NI_20MHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{ /* Termination of list */
|
||||
.dest = 0,
|
||||
},
|
||||
},
|
||||
};
|
@ -0,0 +1,428 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/ni_device_routes/pci-6733.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_6733_device_routes = {
|
||||
.device = "pci-6733",
|
||||
.routes = (struct ni_route_set[]){
|
||||
{
|
||||
.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(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_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_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_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_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_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_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_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),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrSource(1),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrGate(0),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(1),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrGate(1),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(0),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrOut(0),
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(0),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrOut(1),
|
||||
.src = (int[]){
|
||||
NI_CtrInternalOutput(1),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_SampleClock,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_CtrInternalOutput(1),
|
||||
NI_AO_SampleClockTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_SampleClockTimebase,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_StartTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_PauseTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_DI_SampleClock,
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_AO_SampleClock,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_DO_SampleClock,
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_AO_SampleClock,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_MasterTimebase,
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(7),
|
||||
NI_20MHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{ /* Termination of list */
|
||||
.dest = 0,
|
||||
},
|
||||
},
|
||||
};
|
@ -0,0 +1,608 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/ni_device_routes/pxi-6030e.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_pxi_6030e_device_routes = {
|
||||
.device = "pxi-6030e",
|
||||
.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(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),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrSource(1),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrGate(0),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_CtrInternalOutput(1),
|
||||
NI_AI_StartTrigger,
|
||||
NI_AI_ReferenceTrigger,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrGate(1),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_CtrInternalOutput(0),
|
||||
NI_AI_StartTrigger,
|
||||
NI_AI_ReferenceTrigger,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrOut(0),
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_CtrInternalOutput(0),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrOut(1),
|
||||
.src = (int[]){
|
||||
NI_CtrInternalOutput(1),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_SampleClock,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_CtrInternalOutput(0),
|
||||
NI_AI_SampleClockTimebase,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_SampleClockTimebase,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_StartTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_CtrInternalOutput(0),
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_ReferenceTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_ConvertClock,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_CtrInternalOutput(0),
|
||||
NI_AI_ConvertClockTimebase,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_ConvertClockTimebase,
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(7),
|
||||
NI_AI_SampleClockTimebase,
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_PauseTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AI_HoldComplete,
|
||||
.src = (int[]){
|
||||
NI_AI_HoldCompleteEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_SampleClock,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_CtrInternalOutput(1),
|
||||
NI_AO_SampleClockTimebase,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_SampleClockTimebase,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(7),
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_StartTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_AI_StartTrigger,
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_PauseTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_AnalogComparisonEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_MasterTimebase,
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(7),
|
||||
NI_20MHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{ /* Termination of list */
|
||||
.dest = 0,
|
||||
},
|
||||
},
|
||||
};
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,428 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/ni_device_routes/pxi-6733.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_pxi_6733_device_routes = {
|
||||
.device = "pxi-6733",
|
||||
.routes = (struct ni_route_set[]){
|
||||
{
|
||||
.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(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_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_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_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_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_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_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),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(7),
|
||||
PXI_Star,
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrSource(1),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(7),
|
||||
PXI_Star,
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrGate(0),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_CtrInternalOutput(1),
|
||||
PXI_Star,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrGate(1),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_CtrInternalOutput(0),
|
||||
PXI_Star,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrOut(0),
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_CtrInternalOutput(0),
|
||||
PXI_Star,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_CtrOut(1),
|
||||
.src = (int[]){
|
||||
NI_CtrInternalOutput(1),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = PXI_Star,
|
||||
.src = (int[]){
|
||||
NI_CtrSource(0),
|
||||
NI_CtrGate(0),
|
||||
NI_CtrInternalOutput(0),
|
||||
NI_CtrOut(0),
|
||||
NI_AO_SampleClock,
|
||||
NI_AO_StartTrigger,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_SampleClock,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_CtrInternalOutput(1),
|
||||
PXI_Star,
|
||||
NI_AO_SampleClockTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_SampleClockTimebase,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(7),
|
||||
PXI_Star,
|
||||
NI_MasterTimebase,
|
||||
NI_20MHzTimebase,
|
||||
NI_100kHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_StartTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
PXI_Star,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_AO_PauseTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
NI_PFI(6),
|
||||
NI_PFI(7),
|
||||
NI_PFI(8),
|
||||
NI_PFI(9),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
PXI_Star,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_DI_SampleClock,
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
PXI_Star,
|
||||
NI_AO_SampleClock,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_DO_SampleClock,
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
PXI_Star,
|
||||
NI_AO_SampleClock,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_MasterTimebase,
|
||||
.src = (int[]){
|
||||
TRIGGER_LINE(7),
|
||||
NI_20MHzTimebase,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{ /* Termination of list */
|
||||
.dest = 0,
|
||||
},
|
||||
},
|
||||
};
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,575 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/ni_device_routes/pxie-6535.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_pxie_6535_device_routes = {
|
||||
.device = "pxie-6535",
|
||||
.routes = (struct ni_route_set[]){
|
||||
{
|
||||
.dest = NI_PFI(0),
|
||||
.src = (int[]){
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_DI_StartTrigger,
|
||||
NI_DI_ReferenceTrigger,
|
||||
NI_DI_InputBufferFull,
|
||||
NI_DI_ReadyForStartEvent,
|
||||
NI_DI_ReadyForTransferEventBurst,
|
||||
NI_DI_ReadyForTransferEventPipelined,
|
||||
NI_DO_StartTrigger,
|
||||
NI_DO_OutputBufferFull,
|
||||
NI_DO_DataActiveEvent,
|
||||
NI_DO_ReadyForStartEvent,
|
||||
NI_DO_ReadyForTransferEvent,
|
||||
NI_ChangeDetectionEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_PFI(1),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_DI_StartTrigger,
|
||||
NI_DI_ReferenceTrigger,
|
||||
NI_DI_InputBufferFull,
|
||||
NI_DI_ReadyForStartEvent,
|
||||
NI_DI_ReadyForTransferEventBurst,
|
||||
NI_DI_ReadyForTransferEventPipelined,
|
||||
NI_DO_StartTrigger,
|
||||
NI_DO_OutputBufferFull,
|
||||
NI_DO_DataActiveEvent,
|
||||
NI_DO_ReadyForStartEvent,
|
||||
NI_DO_ReadyForTransferEvent,
|
||||
NI_ChangeDetectionEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_PFI(2),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_DI_StartTrigger,
|
||||
NI_DI_ReferenceTrigger,
|
||||
NI_DI_InputBufferFull,
|
||||
NI_DI_ReadyForStartEvent,
|
||||
NI_DI_ReadyForTransferEventBurst,
|
||||
NI_DI_ReadyForTransferEventPipelined,
|
||||
NI_DO_StartTrigger,
|
||||
NI_DO_OutputBufferFull,
|
||||
NI_DO_DataActiveEvent,
|
||||
NI_DO_ReadyForStartEvent,
|
||||
NI_DO_ReadyForTransferEvent,
|
||||
NI_ChangeDetectionEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_PFI(3),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_DI_StartTrigger,
|
||||
NI_DI_ReferenceTrigger,
|
||||
NI_DI_InputBufferFull,
|
||||
NI_DI_ReadyForStartEvent,
|
||||
NI_DI_ReadyForTransferEventBurst,
|
||||
NI_DI_ReadyForTransferEventPipelined,
|
||||
NI_DO_StartTrigger,
|
||||
NI_DO_OutputBufferFull,
|
||||
NI_DO_DataActiveEvent,
|
||||
NI_DO_ReadyForStartEvent,
|
||||
NI_DO_ReadyForTransferEvent,
|
||||
NI_ChangeDetectionEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_PFI(4),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
TRIGGER_LINE(7),
|
||||
NI_DI_StartTrigger,
|
||||
NI_DI_ReferenceTrigger,
|
||||
NI_DI_InputBufferFull,
|
||||
NI_DI_ReadyForStartEvent,
|
||||
NI_DI_ReadyForTransferEventBurst,
|
||||
NI_DI_ReadyForTransferEventPipelined,
|
||||
NI_DO_SampleClock,
|
||||
NI_DO_StartTrigger,
|
||||
NI_DO_OutputBufferFull,
|
||||
NI_DO_DataActiveEvent,
|
||||
NI_DO_ReadyForStartEvent,
|
||||
NI_DO_ReadyForTransferEvent,
|
||||
NI_ChangeDetectionEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_PFI(5),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
TRIGGER_LINE(7),
|
||||
NI_DI_SampleClock,
|
||||
NI_DI_StartTrigger,
|
||||
NI_DI_ReferenceTrigger,
|
||||
NI_DI_InputBufferFull,
|
||||
NI_DI_ReadyForStartEvent,
|
||||
NI_DI_ReadyForTransferEventBurst,
|
||||
NI_DI_ReadyForTransferEventPipelined,
|
||||
NI_DO_StartTrigger,
|
||||
NI_DO_OutputBufferFull,
|
||||
NI_DO_DataActiveEvent,
|
||||
NI_DO_ReadyForStartEvent,
|
||||
NI_DO_ReadyForTransferEvent,
|
||||
NI_ChangeDetectionEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(0),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_DI_StartTrigger,
|
||||
NI_DI_ReferenceTrigger,
|
||||
NI_DI_InputBufferFull,
|
||||
NI_DI_ReadyForStartEvent,
|
||||
NI_DI_ReadyForTransferEventBurst,
|
||||
NI_DI_ReadyForTransferEventPipelined,
|
||||
NI_DO_StartTrigger,
|
||||
NI_DO_OutputBufferFull,
|
||||
NI_DO_DataActiveEvent,
|
||||
NI_DO_ReadyForStartEvent,
|
||||
NI_DO_ReadyForTransferEvent,
|
||||
NI_ChangeDetectionEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(1),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_DI_StartTrigger,
|
||||
NI_DI_ReferenceTrigger,
|
||||
NI_DI_InputBufferFull,
|
||||
NI_DI_ReadyForStartEvent,
|
||||
NI_DI_ReadyForTransferEventBurst,
|
||||
NI_DI_ReadyForTransferEventPipelined,
|
||||
NI_DO_StartTrigger,
|
||||
NI_DO_OutputBufferFull,
|
||||
NI_DO_DataActiveEvent,
|
||||
NI_DO_ReadyForStartEvent,
|
||||
NI_DO_ReadyForTransferEvent,
|
||||
NI_ChangeDetectionEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(2),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_DI_StartTrigger,
|
||||
NI_DI_ReferenceTrigger,
|
||||
NI_DI_InputBufferFull,
|
||||
NI_DI_ReadyForStartEvent,
|
||||
NI_DI_ReadyForTransferEventBurst,
|
||||
NI_DI_ReadyForTransferEventPipelined,
|
||||
NI_DO_StartTrigger,
|
||||
NI_DO_OutputBufferFull,
|
||||
NI_DO_DataActiveEvent,
|
||||
NI_DO_ReadyForStartEvent,
|
||||
NI_DO_ReadyForTransferEvent,
|
||||
NI_ChangeDetectionEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(3),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_DI_StartTrigger,
|
||||
NI_DI_ReferenceTrigger,
|
||||
NI_DI_InputBufferFull,
|
||||
NI_DI_ReadyForStartEvent,
|
||||
NI_DI_ReadyForTransferEventBurst,
|
||||
NI_DI_ReadyForTransferEventPipelined,
|
||||
NI_DO_StartTrigger,
|
||||
NI_DO_OutputBufferFull,
|
||||
NI_DO_DataActiveEvent,
|
||||
NI_DO_ReadyForStartEvent,
|
||||
NI_DO_ReadyForTransferEvent,
|
||||
NI_ChangeDetectionEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(4),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_DI_StartTrigger,
|
||||
NI_DI_ReferenceTrigger,
|
||||
NI_DI_InputBufferFull,
|
||||
NI_DI_ReadyForStartEvent,
|
||||
NI_DI_ReadyForTransferEventBurst,
|
||||
NI_DI_ReadyForTransferEventPipelined,
|
||||
NI_DO_StartTrigger,
|
||||
NI_DO_OutputBufferFull,
|
||||
NI_DO_DataActiveEvent,
|
||||
NI_DO_ReadyForStartEvent,
|
||||
NI_DO_ReadyForTransferEvent,
|
||||
NI_ChangeDetectionEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(5),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(6),
|
||||
NI_DI_StartTrigger,
|
||||
NI_DI_ReferenceTrigger,
|
||||
NI_DI_InputBufferFull,
|
||||
NI_DI_ReadyForStartEvent,
|
||||
NI_DI_ReadyForTransferEventBurst,
|
||||
NI_DI_ReadyForTransferEventPipelined,
|
||||
NI_DO_StartTrigger,
|
||||
NI_DO_OutputBufferFull,
|
||||
NI_DO_DataActiveEvent,
|
||||
NI_DO_ReadyForStartEvent,
|
||||
NI_DO_ReadyForTransferEvent,
|
||||
NI_ChangeDetectionEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(6),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
NI_DI_StartTrigger,
|
||||
NI_DI_ReferenceTrigger,
|
||||
NI_DI_InputBufferFull,
|
||||
NI_DI_ReadyForStartEvent,
|
||||
NI_DI_ReadyForTransferEventBurst,
|
||||
NI_DI_ReadyForTransferEventPipelined,
|
||||
NI_DO_StartTrigger,
|
||||
NI_DO_OutputBufferFull,
|
||||
NI_DO_DataActiveEvent,
|
||||
NI_DO_ReadyForStartEvent,
|
||||
NI_DO_ReadyForTransferEvent,
|
||||
NI_ChangeDetectionEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = TRIGGER_LINE(7),
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
NI_DI_StartTrigger,
|
||||
NI_DI_ReferenceTrigger,
|
||||
NI_DI_InputBufferFull,
|
||||
NI_DI_ReadyForStartEvent,
|
||||
NI_DI_ReadyForTransferEventBurst,
|
||||
NI_DI_ReadyForTransferEventPipelined,
|
||||
NI_DO_SampleClock,
|
||||
NI_DO_StartTrigger,
|
||||
NI_DO_OutputBufferFull,
|
||||
NI_DO_DataActiveEvent,
|
||||
NI_DO_ReadyForStartEvent,
|
||||
NI_DO_ReadyForTransferEvent,
|
||||
NI_ChangeDetectionEvent,
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_DI_SampleClock,
|
||||
.src = (int[]){
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(7),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_DI_StartTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_DI_ReferenceTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_DI_PauseTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_DO_SampleClock,
|
||||
.src = (int[]){
|
||||
NI_PFI(4),
|
||||
TRIGGER_LINE(7),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_DO_StartTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{
|
||||
.dest = NI_DO_PauseTrigger,
|
||||
.src = (int[]){
|
||||
NI_PFI(0),
|
||||
NI_PFI(1),
|
||||
NI_PFI(2),
|
||||
NI_PFI(3),
|
||||
NI_PFI(4),
|
||||
NI_PFI(5),
|
||||
TRIGGER_LINE(0),
|
||||
TRIGGER_LINE(1),
|
||||
TRIGGER_LINE(2),
|
||||
TRIGGER_LINE(3),
|
||||
TRIGGER_LINE(4),
|
||||
TRIGGER_LINE(5),
|
||||
TRIGGER_LINE(6),
|
||||
0, /* Termination */
|
||||
}
|
||||
},
|
||||
{ /* Termination of list */
|
||||
.dest = 0,
|
||||
},
|
||||
},
|
||||
};
|
File diff suppressed because it is too large
Load Diff
42
drivers/staging/comedi/drivers/ni_routing/ni_route_values.c
Normal file
42
drivers/staging/comedi/drivers/ni_routing/ni_route_values.c
Normal file
@ -0,0 +1,42 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/ni_route_values.c
|
||||
* Route information for 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 includes the tables that are a list of all the values of various
|
||||
* signals routes available on NI hardware. In many cases, one does not
|
||||
* explicitly make these routes, rather one might indicate that something is
|
||||
* used as the source of one particular trigger or another (using
|
||||
* *_src=TRIG_EXT).
|
||||
*
|
||||
* 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_route_values.h"
|
||||
#include "ni_route_values/all.h"
|
||||
|
||||
const struct family_route_values *const ni_all_route_values[] = {
|
||||
&ni_660x_route_values,
|
||||
&ni_eseries_route_values,
|
||||
&ni_mseries_route_values,
|
||||
NULL,
|
||||
};
|
98
drivers/staging/comedi/drivers/ni_routing/ni_route_values.h
Normal file
98
drivers/staging/comedi/drivers/ni_routing/ni_route_values.h
Normal file
@ -0,0 +1,98 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/ni_route_values.h
|
||||
* Route information for 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.
|
||||
*/
|
||||
|
||||
#ifndef _COMEDI_DRIVERS_NI_ROUTINT_NI_ROUTE_VALUES_H
|
||||
#define _COMEDI_DRIVERS_NI_ROUTINT_NI_ROUTE_VALUES_H
|
||||
|
||||
#include "../../comedi.h"
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* This file includes the tables that are a list of all the values of various
|
||||
* signals routes available on NI hardware. In many cases, one does not
|
||||
* explicitly make these routes, rather one might indicate that something is
|
||||
* used as the source of one particular trigger or another (using
|
||||
* *_src=TRIG_EXT).
|
||||
*
|
||||
* This file is meant to be included by comedi/drivers/ni_routes.c
|
||||
*/
|
||||
|
||||
#define B(x) ((x) - NI_NAMES_BASE)
|
||||
|
||||
/** Marks a register value as valid, implemented, and tested. */
|
||||
#define V(x) (((x) & 0x7f) | 0x80)
|
||||
|
||||
#ifndef NI_ROUTE_VALUE_EXTERNAL_CONVERSION
|
||||
/** Marks a register value as implemented but needing testing. */
|
||||
#define I(x) V(x)
|
||||
/** Marks a register value as not implemented. */
|
||||
#define U(x) 0x0
|
||||
|
||||
typedef u8 register_type;
|
||||
#else
|
||||
/** Marks a register value as implemented but needing testing. */
|
||||
#define I(x) (((x) & 0x7f) | 0x100)
|
||||
/** Marks a register value as not implemented. */
|
||||
#define U(x) (((x) & 0x7f) | 0x200)
|
||||
|
||||
/** Tests whether a register is marked as valid/implemented/tested */
|
||||
#define MARKED_V(x) (((x) & 0x80) != 0)
|
||||
/** Tests whether a register is implemented but not tested */
|
||||
#define MARKED_I(x) (((x) & 0x100) != 0)
|
||||
/** Tests whether a register is not implemented */
|
||||
#define MARKED_U(x) (((x) & 0x200) != 0)
|
||||
|
||||
/* need more space to store extra marks */
|
||||
typedef u16 register_type;
|
||||
#endif
|
||||
|
||||
/* Mask out the marking bit(s). */
|
||||
#define UNMARK(x) ((x) & 0x7f)
|
||||
|
||||
/*
|
||||
* Gi_SRC(x,1) implements Gi_Src_SubSelect = 1
|
||||
*
|
||||
* This appears to only really be a valid MUX for m-series devices.
|
||||
*/
|
||||
#define Gi_SRC(val, subsel) ((val) | ((subsel) << 6))
|
||||
|
||||
/**
|
||||
* struct family_route_values - Register values for all routes for a particular
|
||||
* family.
|
||||
* @family: lower-case string representation of a specific series or family of
|
||||
* devices from National Instruments where each member of this family
|
||||
* shares the same register values for the various signal MUXes. It
|
||||
* should be noted that not all devices of any family have access to
|
||||
* all routes defined.
|
||||
* @register_values: Table of all register values for various signal MUXes on
|
||||
* National Instruments devices. The first index of this table is the
|
||||
* signal destination (i.e. identification of the signal MUX). The
|
||||
* second index of this table is the signal source (i.e. input of the
|
||||
* signal MUX).
|
||||
*/
|
||||
struct family_route_values {
|
||||
const char *family;
|
||||
const register_type register_values[NI_NUM_NAMES][NI_NUM_NAMES];
|
||||
|
||||
};
|
||||
|
||||
extern const struct family_route_values *const ni_all_route_values[];
|
||||
|
||||
#endif /* _COMEDI_DRIVERS_NI_ROUTINT_NI_ROUTE_VALUES_H */
|
@ -0,0 +1,37 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/ni_route_values/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_ROUTE_VALUES_EXTERN_H
|
||||
#define _COMEDI_DRIVERS_NI_ROUTING_NI_ROUTE_VALUES_EXTERN_H
|
||||
|
||||
#include "../ni_route_values.h"
|
||||
|
||||
extern const struct family_route_values ni_660x_route_values;
|
||||
extern const struct family_route_values ni_eseries_route_values;
|
||||
extern const struct family_route_values ni_mseries_route_values;
|
||||
|
||||
#endif //_COMEDI_DRIVERS_NI_ROUTING_NI_ROUTE_VALUES_EXTERN_H
|
@ -0,0 +1,650 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/ni_route_values/ni_660x.c
|
||||
* Route information for NI_660X 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 includes a list of all the values of various signals routes
|
||||
* available on NI 660x hardware. In many cases, one does not explicitly make
|
||||
* these routes, rather one might indicate that something is used as the source
|
||||
* of one particular trigger or another (using *_src=TRIG_EXT).
|
||||
*
|
||||
* The contents of this file can be generated using the tools in
|
||||
* comedi/drivers/ni_routing/tools. This file also contains specific notes to
|
||||
* this family of devices.
|
||||
*
|
||||
* Please use those tools to help maintain the contents of this file, but be
|
||||
* mindful to not lose the notes already made in this file, since these notes
|
||||
* are critical to a complete undertsanding of the register values of this
|
||||
* family.
|
||||
*/
|
||||
|
||||
#include "../ni_route_values.h"
|
||||
#include "all.h"
|
||||
|
||||
const struct family_route_values ni_660x_route_values = {
|
||||
.family = "ni_660x",
|
||||
.register_values = {
|
||||
/*
|
||||
* destination = {
|
||||
* source = register value,
|
||||
* ...
|
||||
* }
|
||||
*/
|
||||
[B(NI_PFI(8))] = {
|
||||
[B(NI_CtrInternalOutput(7))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(10))] = {
|
||||
[B(NI_CtrGate(7))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(11))] = {
|
||||
[B(NI_CtrSource(7))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(12))] = {
|
||||
[B(NI_CtrInternalOutput(6))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(14))] = {
|
||||
[B(NI_CtrGate(6))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(15))] = {
|
||||
[B(NI_CtrSource(6))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(16))] = {
|
||||
[B(NI_CtrInternalOutput(5))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(18))] = {
|
||||
[B(NI_CtrGate(5))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(19))] = {
|
||||
[B(NI_CtrSource(5))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(20))] = {
|
||||
[B(NI_CtrInternalOutput(4))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(22))] = {
|
||||
[B(NI_CtrGate(4))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(23))] = {
|
||||
[B(NI_CtrSource(4))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(24))] = {
|
||||
[B(NI_CtrInternalOutput(3))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(26))] = {
|
||||
[B(NI_CtrGate(3))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(27))] = {
|
||||
[B(NI_CtrSource(3))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(28))] = {
|
||||
[B(NI_CtrInternalOutput(2))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(30))] = {
|
||||
[B(NI_CtrGate(2))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(31))] = {
|
||||
[B(NI_CtrSource(2))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(32))] = {
|
||||
[B(NI_CtrInternalOutput(1))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(34))] = {
|
||||
[B(NI_CtrGate(1))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(35))] = {
|
||||
[B(NI_CtrSource(1))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(36))] = {
|
||||
[B(NI_CtrInternalOutput(0))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(38))] = {
|
||||
[B(NI_CtrGate(0))] = I(1),
|
||||
},
|
||||
[B(NI_PFI(39))] = {
|
||||
[B(NI_CtrSource(0))] = I(1),
|
||||
},
|
||||
[B(NI_CtrSource(0))] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_PFI(11))] = U(9),
|
||||
[B(NI_PFI(15))] = U(8),
|
||||
[B(NI_PFI(19))] = U(7),
|
||||
[B(NI_PFI(23))] = U(6),
|
||||
[B(NI_PFI(27))] = U(5),
|
||||
[B(NI_PFI(31))] = U(4),
|
||||
[B(NI_PFI(35))] = U(3),
|
||||
[B(NI_PFI(39))] = U(2 /* or 1 */),
|
||||
[B(TRIGGER_LINE(0))] = U(11),
|
||||
[B(TRIGGER_LINE(1))] = U(12),
|
||||
[B(TRIGGER_LINE(2))] = U(13),
|
||||
[B(TRIGGER_LINE(3))] = U(14),
|
||||
[B(TRIGGER_LINE(4))] = U(15),
|
||||
[B(TRIGGER_LINE(5))] = U(16),
|
||||
[B(TRIGGER_LINE(6))] = U(17),
|
||||
[B(NI_CtrGate(1))] = U(10),
|
||||
[B(NI_20MHzTimebase)] = U(0),
|
||||
[B(NI_80MHzTimebase)] = U(30),
|
||||
[B(NI_100kHzTimebase)] = U(18),
|
||||
[B(NI_LogicLow)] = U(31),
|
||||
},
|
||||
[B(NI_CtrSource(1))] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_PFI(11))] = U(9),
|
||||
[B(NI_PFI(15))] = U(8),
|
||||
[B(NI_PFI(19))] = U(7),
|
||||
[B(NI_PFI(23))] = U(6),
|
||||
[B(NI_PFI(27))] = U(5),
|
||||
[B(NI_PFI(31))] = U(4),
|
||||
[B(NI_PFI(35))] = U(3 /* or 1 */),
|
||||
[B(NI_PFI(39))] = U(2),
|
||||
[B(TRIGGER_LINE(0))] = U(11),
|
||||
[B(TRIGGER_LINE(1))] = U(12),
|
||||
[B(TRIGGER_LINE(2))] = U(13),
|
||||
[B(TRIGGER_LINE(3))] = U(14),
|
||||
[B(TRIGGER_LINE(4))] = U(15),
|
||||
[B(TRIGGER_LINE(5))] = U(16),
|
||||
[B(TRIGGER_LINE(6))] = U(17),
|
||||
[B(NI_CtrGate(2))] = U(10),
|
||||
[B(NI_20MHzTimebase)] = U(0),
|
||||
[B(NI_80MHzTimebase)] = U(30),
|
||||
[B(NI_100kHzTimebase)] = U(18),
|
||||
[B(NI_LogicLow)] = U(31),
|
||||
},
|
||||
[B(NI_CtrSource(2))] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_PFI(11))] = U(9),
|
||||
[B(NI_PFI(15))] = U(8),
|
||||
[B(NI_PFI(19))] = U(7),
|
||||
[B(NI_PFI(23))] = U(6),
|
||||
[B(NI_PFI(27))] = U(5),
|
||||
[B(NI_PFI(31))] = U(4 /* or 1 */),
|
||||
[B(NI_PFI(35))] = U(3),
|
||||
[B(NI_PFI(39))] = U(2),
|
||||
[B(TRIGGER_LINE(0))] = U(11),
|
||||
[B(TRIGGER_LINE(1))] = U(12),
|
||||
[B(TRIGGER_LINE(2))] = U(13),
|
||||
[B(TRIGGER_LINE(3))] = U(14),
|
||||
[B(TRIGGER_LINE(4))] = U(15),
|
||||
[B(TRIGGER_LINE(5))] = U(16),
|
||||
[B(TRIGGER_LINE(6))] = U(17),
|
||||
[B(NI_CtrGate(3))] = U(10),
|
||||
[B(NI_20MHzTimebase)] = U(0),
|
||||
[B(NI_80MHzTimebase)] = U(30),
|
||||
[B(NI_100kHzTimebase)] = U(18),
|
||||
[B(NI_LogicLow)] = U(31),
|
||||
},
|
||||
[B(NI_CtrSource(3))] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_PFI(11))] = U(9),
|
||||
[B(NI_PFI(15))] = U(8),
|
||||
[B(NI_PFI(19))] = U(7),
|
||||
[B(NI_PFI(23))] = U(6),
|
||||
[B(NI_PFI(27))] = U(5 /* or 1 */),
|
||||
[B(NI_PFI(31))] = U(4),
|
||||
[B(NI_PFI(35))] = U(3),
|
||||
[B(NI_PFI(39))] = U(2),
|
||||
[B(TRIGGER_LINE(0))] = U(11),
|
||||
[B(TRIGGER_LINE(1))] = U(12),
|
||||
[B(TRIGGER_LINE(2))] = U(13),
|
||||
[B(TRIGGER_LINE(3))] = U(14),
|
||||
[B(TRIGGER_LINE(4))] = U(15),
|
||||
[B(TRIGGER_LINE(5))] = U(16),
|
||||
[B(TRIGGER_LINE(6))] = U(17),
|
||||
[B(NI_CtrGate(4))] = U(10),
|
||||
[B(NI_20MHzTimebase)] = U(0),
|
||||
[B(NI_80MHzTimebase)] = U(30),
|
||||
[B(NI_100kHzTimebase)] = U(18),
|
||||
[B(NI_LogicLow)] = U(31),
|
||||
},
|
||||
[B(NI_CtrSource(4))] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_PFI(11))] = U(9),
|
||||
[B(NI_PFI(15))] = U(8),
|
||||
[B(NI_PFI(19))] = U(7),
|
||||
[B(NI_PFI(23))] = U(6 /* or 1 */),
|
||||
[B(NI_PFI(27))] = U(5),
|
||||
[B(NI_PFI(31))] = U(4),
|
||||
[B(NI_PFI(35))] = U(3),
|
||||
[B(NI_PFI(39))] = U(2),
|
||||
[B(TRIGGER_LINE(0))] = U(11),
|
||||
[B(TRIGGER_LINE(1))] = U(12),
|
||||
[B(TRIGGER_LINE(2))] = U(13),
|
||||
[B(TRIGGER_LINE(3))] = U(14),
|
||||
[B(TRIGGER_LINE(4))] = U(15),
|
||||
[B(TRIGGER_LINE(5))] = U(16),
|
||||
[B(TRIGGER_LINE(6))] = U(17),
|
||||
[B(NI_CtrGate(5))] = U(10),
|
||||
[B(NI_20MHzTimebase)] = U(0),
|
||||
[B(NI_80MHzTimebase)] = U(30),
|
||||
[B(NI_100kHzTimebase)] = U(18),
|
||||
[B(NI_LogicLow)] = U(31),
|
||||
},
|
||||
[B(NI_CtrSource(5))] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_PFI(11))] = U(9),
|
||||
[B(NI_PFI(15))] = U(8),
|
||||
[B(NI_PFI(19))] = U(7 /* or 1 */),
|
||||
[B(NI_PFI(23))] = U(6),
|
||||
[B(NI_PFI(27))] = U(5),
|
||||
[B(NI_PFI(31))] = U(4),
|
||||
[B(NI_PFI(35))] = U(3),
|
||||
[B(NI_PFI(39))] = U(2),
|
||||
[B(TRIGGER_LINE(0))] = U(11),
|
||||
[B(TRIGGER_LINE(1))] = U(12),
|
||||
[B(TRIGGER_LINE(2))] = U(13),
|
||||
[B(TRIGGER_LINE(3))] = U(14),
|
||||
[B(TRIGGER_LINE(4))] = U(15),
|
||||
[B(TRIGGER_LINE(5))] = U(16),
|
||||
[B(TRIGGER_LINE(6))] = U(17),
|
||||
[B(NI_CtrGate(6))] = U(10),
|
||||
[B(NI_20MHzTimebase)] = U(0),
|
||||
[B(NI_80MHzTimebase)] = U(30),
|
||||
[B(NI_100kHzTimebase)] = U(18),
|
||||
[B(NI_LogicLow)] = U(31),
|
||||
},
|
||||
[B(NI_CtrSource(6))] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_PFI(11))] = U(9),
|
||||
[B(NI_PFI(15))] = U(8 /* or 1 */),
|
||||
[B(NI_PFI(19))] = U(7),
|
||||
[B(NI_PFI(23))] = U(6),
|
||||
[B(NI_PFI(27))] = U(5),
|
||||
[B(NI_PFI(31))] = U(4),
|
||||
[B(NI_PFI(35))] = U(3),
|
||||
[B(NI_PFI(39))] = U(2),
|
||||
[B(TRIGGER_LINE(0))] = U(11),
|
||||
[B(TRIGGER_LINE(1))] = U(12),
|
||||
[B(TRIGGER_LINE(2))] = U(13),
|
||||
[B(TRIGGER_LINE(3))] = U(14),
|
||||
[B(TRIGGER_LINE(4))] = U(15),
|
||||
[B(TRIGGER_LINE(5))] = U(16),
|
||||
[B(TRIGGER_LINE(6))] = U(17),
|
||||
[B(NI_CtrGate(7))] = U(10),
|
||||
[B(NI_20MHzTimebase)] = U(0),
|
||||
[B(NI_80MHzTimebase)] = U(30),
|
||||
[B(NI_100kHzTimebase)] = U(18),
|
||||
[B(NI_LogicLow)] = U(31),
|
||||
},
|
||||
[B(NI_CtrSource(7))] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_PFI(11))] = U(9 /* or 1 */),
|
||||
[B(NI_PFI(15))] = U(8),
|
||||
[B(NI_PFI(19))] = U(7),
|
||||
[B(NI_PFI(23))] = U(6),
|
||||
[B(NI_PFI(27))] = U(5),
|
||||
[B(NI_PFI(31))] = U(4),
|
||||
[B(NI_PFI(35))] = U(3),
|
||||
[B(NI_PFI(39))] = U(2),
|
||||
[B(TRIGGER_LINE(0))] = U(11),
|
||||
[B(TRIGGER_LINE(1))] = U(12),
|
||||
[B(TRIGGER_LINE(2))] = U(13),
|
||||
[B(TRIGGER_LINE(3))] = U(14),
|
||||
[B(TRIGGER_LINE(4))] = U(15),
|
||||
[B(TRIGGER_LINE(5))] = U(16),
|
||||
[B(TRIGGER_LINE(6))] = U(17),
|
||||
[B(NI_CtrGate(0))] = U(10),
|
||||
[B(NI_20MHzTimebase)] = U(0),
|
||||
[B(NI_80MHzTimebase)] = U(30),
|
||||
[B(NI_100kHzTimebase)] = U(18),
|
||||
[B(NI_LogicLow)] = U(31),
|
||||
},
|
||||
[B(NI_CtrGate(0))] = {
|
||||
[B(NI_PFI(10))] = I(9),
|
||||
[B(NI_PFI(14))] = I(8),
|
||||
[B(NI_PFI(18))] = I(7),
|
||||
[B(NI_PFI(22))] = I(6),
|
||||
[B(NI_PFI(26))] = I(5),
|
||||
[B(NI_PFI(30))] = I(4),
|
||||
[B(NI_PFI(34))] = I(3),
|
||||
[B(NI_PFI(38))] = I(2 /* or 1 */),
|
||||
[B(NI_PFI(39))] = I(0),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(1))] = I(10),
|
||||
[B(NI_CtrInternalOutput(1))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31 /* or 30 */),
|
||||
},
|
||||
[B(NI_CtrGate(1))] = {
|
||||
[B(NI_PFI(10))] = I(9),
|
||||
[B(NI_PFI(14))] = I(8),
|
||||
[B(NI_PFI(18))] = I(7),
|
||||
[B(NI_PFI(22))] = I(6),
|
||||
[B(NI_PFI(26))] = I(5),
|
||||
[B(NI_PFI(30))] = I(4),
|
||||
[B(NI_PFI(34))] = I(3 /* or 1 */),
|
||||
[B(NI_PFI(35))] = I(0),
|
||||
[B(NI_PFI(38))] = I(2),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(2))] = I(10),
|
||||
[B(NI_CtrInternalOutput(2))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31 /* or 30 */),
|
||||
},
|
||||
[B(NI_CtrGate(2))] = {
|
||||
[B(NI_PFI(10))] = I(9),
|
||||
[B(NI_PFI(14))] = I(8),
|
||||
[B(NI_PFI(18))] = I(7),
|
||||
[B(NI_PFI(22))] = I(6),
|
||||
[B(NI_PFI(26))] = I(5),
|
||||
[B(NI_PFI(30))] = I(4 /* or 1 */),
|
||||
[B(NI_PFI(31))] = I(0),
|
||||
[B(NI_PFI(34))] = I(3),
|
||||
[B(NI_PFI(38))] = I(2),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(3))] = I(10),
|
||||
[B(NI_CtrInternalOutput(3))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31 /* or 30 */),
|
||||
},
|
||||
[B(NI_CtrGate(3))] = {
|
||||
[B(NI_PFI(10))] = I(9),
|
||||
[B(NI_PFI(14))] = I(8),
|
||||
[B(NI_PFI(18))] = I(7),
|
||||
[B(NI_PFI(22))] = I(6),
|
||||
[B(NI_PFI(26))] = I(5 /* or 1 */),
|
||||
[B(NI_PFI(27))] = I(0),
|
||||
[B(NI_PFI(30))] = I(4),
|
||||
[B(NI_PFI(34))] = I(3),
|
||||
[B(NI_PFI(38))] = I(2),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(4))] = I(10),
|
||||
[B(NI_CtrInternalOutput(4))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31 /* or 30 */),
|
||||
},
|
||||
[B(NI_CtrGate(4))] = {
|
||||
[B(NI_PFI(10))] = I(9),
|
||||
[B(NI_PFI(14))] = I(8),
|
||||
[B(NI_PFI(18))] = I(7),
|
||||
[B(NI_PFI(22))] = I(6 /* or 1 */),
|
||||
[B(NI_PFI(23))] = I(0),
|
||||
[B(NI_PFI(26))] = I(5),
|
||||
[B(NI_PFI(30))] = I(4),
|
||||
[B(NI_PFI(34))] = I(3),
|
||||
[B(NI_PFI(38))] = I(2),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(5))] = I(10),
|
||||
[B(NI_CtrInternalOutput(5))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31 /* or 30 */),
|
||||
},
|
||||
[B(NI_CtrGate(5))] = {
|
||||
[B(NI_PFI(10))] = I(9),
|
||||
[B(NI_PFI(14))] = I(8),
|
||||
[B(NI_PFI(18))] = I(7 /* or 1 */),
|
||||
[B(NI_PFI(19))] = I(0),
|
||||
[B(NI_PFI(22))] = I(6),
|
||||
[B(NI_PFI(26))] = I(5),
|
||||
[B(NI_PFI(30))] = I(4),
|
||||
[B(NI_PFI(34))] = I(3),
|
||||
[B(NI_PFI(38))] = I(2),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(6))] = I(10),
|
||||
[B(NI_CtrInternalOutput(6))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31 /* or 30 */),
|
||||
},
|
||||
[B(NI_CtrGate(6))] = {
|
||||
[B(NI_PFI(10))] = I(9),
|
||||
[B(NI_PFI(14))] = I(8 /* or 1 */),
|
||||
[B(NI_PFI(15))] = I(0),
|
||||
[B(NI_PFI(18))] = I(7),
|
||||
[B(NI_PFI(22))] = I(6),
|
||||
[B(NI_PFI(26))] = I(5),
|
||||
[B(NI_PFI(30))] = I(4),
|
||||
[B(NI_PFI(34))] = I(3),
|
||||
[B(NI_PFI(38))] = I(2),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(7))] = I(10),
|
||||
[B(NI_CtrInternalOutput(7))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31 /* or 30 */),
|
||||
},
|
||||
[B(NI_CtrGate(7))] = {
|
||||
[B(NI_PFI(10))] = I(9 /* or 1 */),
|
||||
[B(NI_PFI(11))] = I(0),
|
||||
[B(NI_PFI(14))] = I(8),
|
||||
[B(NI_PFI(18))] = I(7),
|
||||
[B(NI_PFI(22))] = I(6),
|
||||
[B(NI_PFI(26))] = I(5),
|
||||
[B(NI_PFI(30))] = I(4),
|
||||
[B(NI_PFI(34))] = I(3),
|
||||
[B(NI_PFI(38))] = I(2),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(0))] = I(10),
|
||||
[B(NI_CtrInternalOutput(0))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31 /* or 30 */),
|
||||
},
|
||||
[B(NI_CtrAux(0))] = {
|
||||
[B(NI_PFI(9))] = I(9),
|
||||
[B(NI_PFI(13))] = I(8),
|
||||
[B(NI_PFI(17))] = I(7),
|
||||
[B(NI_PFI(21))] = I(6),
|
||||
[B(NI_PFI(25))] = I(5),
|
||||
[B(NI_PFI(29))] = I(4),
|
||||
[B(NI_PFI(33))] = I(3),
|
||||
[B(NI_PFI(37))] = I(2 /* or 1 */),
|
||||
[B(NI_PFI(39))] = I(0),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(1))] = I(10),
|
||||
[B(NI_CtrGate(1))] = I(30),
|
||||
[B(NI_CtrInternalOutput(1))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31),
|
||||
},
|
||||
[B(NI_CtrAux(1))] = {
|
||||
[B(NI_PFI(9))] = I(9),
|
||||
[B(NI_PFI(13))] = I(8),
|
||||
[B(NI_PFI(17))] = I(7),
|
||||
[B(NI_PFI(21))] = I(6),
|
||||
[B(NI_PFI(25))] = I(5),
|
||||
[B(NI_PFI(29))] = I(4),
|
||||
[B(NI_PFI(33))] = I(3 /* or 1 */),
|
||||
[B(NI_PFI(35))] = I(0),
|
||||
[B(NI_PFI(37))] = I(2),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(2))] = I(10),
|
||||
[B(NI_CtrGate(2))] = I(30),
|
||||
[B(NI_CtrInternalOutput(2))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31),
|
||||
},
|
||||
[B(NI_CtrAux(2))] = {
|
||||
[B(NI_PFI(9))] = I(9),
|
||||
[B(NI_PFI(13))] = I(8),
|
||||
[B(NI_PFI(17))] = I(7),
|
||||
[B(NI_PFI(21))] = I(6),
|
||||
[B(NI_PFI(25))] = I(5),
|
||||
[B(NI_PFI(29))] = I(4 /* or 1 */),
|
||||
[B(NI_PFI(31))] = I(0),
|
||||
[B(NI_PFI(33))] = I(3),
|
||||
[B(NI_PFI(37))] = I(2),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(3))] = I(10),
|
||||
[B(NI_CtrGate(3))] = I(30),
|
||||
[B(NI_CtrInternalOutput(3))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31),
|
||||
},
|
||||
[B(NI_CtrAux(3))] = {
|
||||
[B(NI_PFI(9))] = I(9),
|
||||
[B(NI_PFI(13))] = I(8),
|
||||
[B(NI_PFI(17))] = I(7),
|
||||
[B(NI_PFI(21))] = I(6),
|
||||
[B(NI_PFI(25))] = I(5 /* or 1 */),
|
||||
[B(NI_PFI(27))] = I(0),
|
||||
[B(NI_PFI(29))] = I(4),
|
||||
[B(NI_PFI(33))] = I(3),
|
||||
[B(NI_PFI(37))] = I(2),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(4))] = I(10),
|
||||
[B(NI_CtrGate(4))] = I(30),
|
||||
[B(NI_CtrInternalOutput(4))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31),
|
||||
},
|
||||
[B(NI_CtrAux(4))] = {
|
||||
[B(NI_PFI(9))] = I(9),
|
||||
[B(NI_PFI(13))] = I(8),
|
||||
[B(NI_PFI(17))] = I(7),
|
||||
[B(NI_PFI(21))] = I(6 /* or 1 */),
|
||||
[B(NI_PFI(23))] = I(0),
|
||||
[B(NI_PFI(25))] = I(5),
|
||||
[B(NI_PFI(29))] = I(4),
|
||||
[B(NI_PFI(33))] = I(3),
|
||||
[B(NI_PFI(37))] = I(2),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(5))] = I(10),
|
||||
[B(NI_CtrGate(5))] = I(30),
|
||||
[B(NI_CtrInternalOutput(5))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31),
|
||||
},
|
||||
[B(NI_CtrAux(5))] = {
|
||||
[B(NI_PFI(9))] = I(9),
|
||||
[B(NI_PFI(13))] = I(8),
|
||||
[B(NI_PFI(17))] = I(7 /* or 1 */),
|
||||
[B(NI_PFI(19))] = I(0),
|
||||
[B(NI_PFI(21))] = I(6),
|
||||
[B(NI_PFI(25))] = I(5),
|
||||
[B(NI_PFI(29))] = I(4),
|
||||
[B(NI_PFI(33))] = I(3),
|
||||
[B(NI_PFI(37))] = I(2),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(6))] = I(10),
|
||||
[B(NI_CtrGate(6))] = I(30),
|
||||
[B(NI_CtrInternalOutput(6))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31),
|
||||
},
|
||||
[B(NI_CtrAux(6))] = {
|
||||
[B(NI_PFI(9))] = I(9),
|
||||
[B(NI_PFI(13))] = I(8 /* or 1 */),
|
||||
[B(NI_PFI(15))] = I(0),
|
||||
[B(NI_PFI(17))] = I(7),
|
||||
[B(NI_PFI(21))] = I(6),
|
||||
[B(NI_PFI(25))] = I(5),
|
||||
[B(NI_PFI(29))] = I(4),
|
||||
[B(NI_PFI(33))] = I(3),
|
||||
[B(NI_PFI(37))] = I(2),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(7))] = I(10),
|
||||
[B(NI_CtrGate(7))] = I(30),
|
||||
[B(NI_CtrInternalOutput(7))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31),
|
||||
},
|
||||
[B(NI_CtrAux(7))] = {
|
||||
[B(NI_PFI(9))] = I(9 /* or 1 */),
|
||||
[B(NI_PFI(11))] = I(0),
|
||||
[B(NI_PFI(13))] = I(8),
|
||||
[B(NI_PFI(17))] = I(7),
|
||||
[B(NI_PFI(21))] = I(6),
|
||||
[B(NI_PFI(25))] = I(5),
|
||||
[B(NI_PFI(29))] = I(4),
|
||||
[B(NI_PFI(33))] = I(3),
|
||||
[B(NI_PFI(37))] = I(2),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrSource(0))] = I(10),
|
||||
[B(NI_CtrGate(0))] = I(30),
|
||||
[B(NI_CtrInternalOutput(0))] = I(20),
|
||||
[B(NI_LogicLow)] = I(31),
|
||||
},
|
||||
},
|
||||
};
|
@ -0,0 +1,602 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/ni_route_values/ni_eseries.c
|
||||
* Route information for NI_ESERIES 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 includes a list of all the values of various signals routes
|
||||
* available on NI 660x hardware. In many cases, one does not explicitly make
|
||||
* these routes, rather one might indicate that something is used as the source
|
||||
* of one particular trigger or another (using *_src=TRIG_EXT).
|
||||
*
|
||||
* The contents of this file can be generated using the tools in
|
||||
* comedi/drivers/ni_routing/tools. This file also contains specific notes to
|
||||
* this family of devices.
|
||||
*
|
||||
* Please use those tools to help maintain the contents of this file, but be
|
||||
* mindful to not lose the notes already made in this file, since these notes
|
||||
* are critical to a complete undertsanding of the register values of this
|
||||
* family.
|
||||
*/
|
||||
|
||||
#include "../ni_route_values.h"
|
||||
#include "all.h"
|
||||
|
||||
/*
|
||||
* Note that for e-series devices, the backplane TRIGGER_LINE(6) is generally
|
||||
* not connected to RTSI(6).
|
||||
*/
|
||||
|
||||
const struct family_route_values ni_eseries_route_values = {
|
||||
.family = "ni_eseries",
|
||||
.register_values = {
|
||||
/*
|
||||
* destination = {
|
||||
* source = register value,
|
||||
* ...
|
||||
* }
|
||||
*/
|
||||
[B(NI_PFI(0))] = {
|
||||
[B(NI_AI_StartTrigger)] = I(NI_PFI_OUTPUT_AI_START1),
|
||||
},
|
||||
[B(NI_PFI(1))] = {
|
||||
[B(NI_AI_ReferenceTrigger)] = I(NI_PFI_OUTPUT_AI_START2),
|
||||
},
|
||||
[B(NI_PFI(2))] = {
|
||||
[B(NI_AI_ConvertClock)] = I(NI_PFI_OUTPUT_AI_CONVERT),
|
||||
},
|
||||
[B(NI_PFI(3))] = {
|
||||
[B(NI_CtrSource(1))] = I(NI_PFI_OUTPUT_G_SRC1),
|
||||
},
|
||||
[B(NI_PFI(4))] = {
|
||||
[B(NI_CtrGate(1))] = I(NI_PFI_OUTPUT_G_GATE1),
|
||||
},
|
||||
[B(NI_PFI(5))] = {
|
||||
[B(NI_AO_SampleClock)] = I(NI_PFI_OUTPUT_AO_UPDATE_N),
|
||||
},
|
||||
[B(NI_PFI(6))] = {
|
||||
[B(NI_AO_StartTrigger)] = I(NI_PFI_OUTPUT_AO_START1),
|
||||
},
|
||||
[B(NI_PFI(7))] = {
|
||||
[B(NI_AI_SampleClock)] = I(NI_PFI_OUTPUT_AI_START_PULSE),
|
||||
},
|
||||
[B(NI_PFI(8))] = {
|
||||
[B(NI_CtrSource(0))] = I(NI_PFI_OUTPUT_G_SRC0),
|
||||
},
|
||||
[B(NI_PFI(9))] = {
|
||||
[B(NI_CtrGate(0))] = I(NI_PFI_OUTPUT_G_GATE0),
|
||||
},
|
||||
[B(TRIGGER_LINE(0))] = {
|
||||
[B(NI_RTSI_BRD(0))] = I(8),
|
||||
[B(NI_RTSI_BRD(1))] = I(9),
|
||||
[B(NI_RTSI_BRD(2))] = I(10),
|
||||
[B(NI_RTSI_BRD(3))] = I(11),
|
||||
[B(NI_CtrSource(0))] = I(5),
|
||||
[B(NI_CtrGate(0))] = I(6),
|
||||
[B(NI_AI_StartTrigger)] = I(0),
|
||||
[B(NI_AI_ReferenceTrigger)] = I(1),
|
||||
[B(NI_AI_ConvertClock)] = I(2),
|
||||
[B(NI_AO_SampleClock)] = I(3),
|
||||
[B(NI_AO_StartTrigger)] = I(4),
|
||||
[B(NI_RGOUT0)] = I(7),
|
||||
},
|
||||
[B(TRIGGER_LINE(1))] = {
|
||||
[B(NI_RTSI_BRD(0))] = I(8),
|
||||
[B(NI_RTSI_BRD(1))] = I(9),
|
||||
[B(NI_RTSI_BRD(2))] = I(10),
|
||||
[B(NI_RTSI_BRD(3))] = I(11),
|
||||
[B(NI_CtrSource(0))] = I(5),
|
||||
[B(NI_CtrGate(0))] = I(6),
|
||||
[B(NI_AI_StartTrigger)] = I(0),
|
||||
[B(NI_AI_ReferenceTrigger)] = I(1),
|
||||
[B(NI_AI_ConvertClock)] = I(2),
|
||||
[B(NI_AO_SampleClock)] = I(3),
|
||||
[B(NI_AO_StartTrigger)] = I(4),
|
||||
[B(NI_RGOUT0)] = I(7),
|
||||
},
|
||||
[B(TRIGGER_LINE(2))] = {
|
||||
[B(NI_RTSI_BRD(0))] = I(8),
|
||||
[B(NI_RTSI_BRD(1))] = I(9),
|
||||
[B(NI_RTSI_BRD(2))] = I(10),
|
||||
[B(NI_RTSI_BRD(3))] = I(11),
|
||||
[B(NI_CtrSource(0))] = I(5),
|
||||
[B(NI_CtrGate(0))] = I(6),
|
||||
[B(NI_AI_StartTrigger)] = I(0),
|
||||
[B(NI_AI_ReferenceTrigger)] = I(1),
|
||||
[B(NI_AI_ConvertClock)] = I(2),
|
||||
[B(NI_AO_SampleClock)] = I(3),
|
||||
[B(NI_AO_StartTrigger)] = I(4),
|
||||
[B(NI_RGOUT0)] = I(7),
|
||||
},
|
||||
[B(TRIGGER_LINE(3))] = {
|
||||
[B(NI_RTSI_BRD(0))] = I(8),
|
||||
[B(NI_RTSI_BRD(1))] = I(9),
|
||||
[B(NI_RTSI_BRD(2))] = I(10),
|
||||
[B(NI_RTSI_BRD(3))] = I(11),
|
||||
[B(NI_CtrSource(0))] = I(5),
|
||||
[B(NI_CtrGate(0))] = I(6),
|
||||
[B(NI_AI_StartTrigger)] = I(0),
|
||||
[B(NI_AI_ReferenceTrigger)] = I(1),
|
||||
[B(NI_AI_ConvertClock)] = I(2),
|
||||
[B(NI_AO_SampleClock)] = I(3),
|
||||
[B(NI_AO_StartTrigger)] = I(4),
|
||||
[B(NI_RGOUT0)] = I(7),
|
||||
},
|
||||
[B(TRIGGER_LINE(4))] = {
|
||||
[B(NI_RTSI_BRD(0))] = I(8),
|
||||
[B(NI_RTSI_BRD(1))] = I(9),
|
||||
[B(NI_RTSI_BRD(2))] = I(10),
|
||||
[B(NI_RTSI_BRD(3))] = I(11),
|
||||
[B(NI_CtrSource(0))] = I(5),
|
||||
[B(NI_CtrGate(0))] = I(6),
|
||||
[B(NI_AI_StartTrigger)] = I(0),
|
||||
[B(NI_AI_ReferenceTrigger)] = I(1),
|
||||
[B(NI_AI_ConvertClock)] = I(2),
|
||||
[B(NI_AO_SampleClock)] = I(3),
|
||||
[B(NI_AO_StartTrigger)] = I(4),
|
||||
[B(NI_RGOUT0)] = I(7),
|
||||
},
|
||||
[B(TRIGGER_LINE(5))] = {
|
||||
[B(NI_RTSI_BRD(0))] = I(8),
|
||||
[B(NI_RTSI_BRD(1))] = I(9),
|
||||
[B(NI_RTSI_BRD(2))] = I(10),
|
||||
[B(NI_RTSI_BRD(3))] = I(11),
|
||||
[B(NI_CtrSource(0))] = I(5),
|
||||
[B(NI_CtrGate(0))] = I(6),
|
||||
[B(NI_AI_StartTrigger)] = I(0),
|
||||
[B(NI_AI_ReferenceTrigger)] = I(1),
|
||||
[B(NI_AI_ConvertClock)] = I(2),
|
||||
[B(NI_AO_SampleClock)] = I(3),
|
||||
[B(NI_AO_StartTrigger)] = I(4),
|
||||
[B(NI_RGOUT0)] = I(7),
|
||||
},
|
||||
[B(TRIGGER_LINE(6))] = {
|
||||
[B(NI_RTSI_BRD(0))] = I(8),
|
||||
[B(NI_RTSI_BRD(1))] = I(9),
|
||||
[B(NI_RTSI_BRD(2))] = I(10),
|
||||
[B(NI_RTSI_BRD(3))] = I(11),
|
||||
[B(NI_CtrSource(0))] = I(5),
|
||||
[B(NI_CtrGate(0))] = I(6),
|
||||
[B(NI_AI_StartTrigger)] = I(0),
|
||||
[B(NI_AI_ReferenceTrigger)] = I(1),
|
||||
[B(NI_AI_ConvertClock)] = I(2),
|
||||
[B(NI_AO_SampleClock)] = I(3),
|
||||
[B(NI_AO_StartTrigger)] = I(4),
|
||||
[B(NI_RGOUT0)] = I(7),
|
||||
},
|
||||
[B(TRIGGER_LINE(7))] = {
|
||||
[B(NI_20MHzTimebase)] = I(NI_RTSI_OUTPUT_RTSI_OSC),
|
||||
},
|
||||
[B(NI_RTSI_BRD(0))] = {
|
||||
[B(TRIGGER_LINE(0))] = I(0),
|
||||
[B(TRIGGER_LINE(1))] = I(1),
|
||||
[B(TRIGGER_LINE(2))] = I(2),
|
||||
[B(TRIGGER_LINE(3))] = I(3),
|
||||
[B(TRIGGER_LINE(4))] = I(4),
|
||||
[B(TRIGGER_LINE(5))] = I(5),
|
||||
[B(TRIGGER_LINE(6))] = I(6),
|
||||
[B(PXI_Star)] = I(6),
|
||||
[B(NI_AI_STOP)] = I(7),
|
||||
},
|
||||
[B(NI_RTSI_BRD(1))] = {
|
||||
[B(TRIGGER_LINE(0))] = I(0),
|
||||
[B(TRIGGER_LINE(1))] = I(1),
|
||||
[B(TRIGGER_LINE(2))] = I(2),
|
||||
[B(TRIGGER_LINE(3))] = I(3),
|
||||
[B(TRIGGER_LINE(4))] = I(4),
|
||||
[B(TRIGGER_LINE(5))] = I(5),
|
||||
[B(TRIGGER_LINE(6))] = I(6),
|
||||
[B(PXI_Star)] = I(6),
|
||||
[B(NI_AI_STOP)] = I(7),
|
||||
},
|
||||
[B(NI_RTSI_BRD(2))] = {
|
||||
[B(TRIGGER_LINE(0))] = I(0),
|
||||
[B(TRIGGER_LINE(1))] = I(1),
|
||||
[B(TRIGGER_LINE(2))] = I(2),
|
||||
[B(TRIGGER_LINE(3))] = I(3),
|
||||
[B(TRIGGER_LINE(4))] = I(4),
|
||||
[B(TRIGGER_LINE(5))] = I(5),
|
||||
[B(TRIGGER_LINE(6))] = I(6),
|
||||
[B(PXI_Star)] = I(6),
|
||||
[B(NI_AI_SampleClock)] = I(7),
|
||||
},
|
||||
[B(NI_RTSI_BRD(3))] = {
|
||||
[B(TRIGGER_LINE(0))] = I(0),
|
||||
[B(TRIGGER_LINE(1))] = I(1),
|
||||
[B(TRIGGER_LINE(2))] = I(2),
|
||||
[B(TRIGGER_LINE(3))] = I(3),
|
||||
[B(TRIGGER_LINE(4))] = I(4),
|
||||
[B(TRIGGER_LINE(5))] = I(5),
|
||||
[B(TRIGGER_LINE(6))] = I(6),
|
||||
[B(PXI_Star)] = I(6),
|
||||
[B(NI_AI_SampleClock)] = I(7),
|
||||
},
|
||||
[B(NI_CtrSource(0))] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_PFI(0))] = U(1),
|
||||
[B(NI_PFI(1))] = U(2),
|
||||
[B(NI_PFI(2))] = U(3),
|
||||
[B(NI_PFI(3))] = U(4),
|
||||
[B(NI_PFI(4))] = U(5),
|
||||
[B(NI_PFI(5))] = U(6),
|
||||
[B(NI_PFI(6))] = U(7),
|
||||
[B(NI_PFI(7))] = U(8),
|
||||
[B(NI_PFI(8))] = U(9),
|
||||
[B(NI_PFI(9))] = U(10),
|
||||
[B(TRIGGER_LINE(0))] = U(11),
|
||||
[B(TRIGGER_LINE(1))] = U(12),
|
||||
[B(TRIGGER_LINE(2))] = U(13),
|
||||
[B(TRIGGER_LINE(3))] = U(14),
|
||||
[B(TRIGGER_LINE(4))] = U(15),
|
||||
[B(TRIGGER_LINE(5))] = U(16),
|
||||
[B(TRIGGER_LINE(6))] = U(17),
|
||||
[B(NI_CtrInternalOutput(1))] = U(19),
|
||||
[B(PXI_Star)] = U(17),
|
||||
[B(NI_20MHzTimebase)] = U(0),
|
||||
[B(NI_100kHzTimebase)] = U(18),
|
||||
[B(NI_LogicLow)] = U(31),
|
||||
},
|
||||
[B(NI_CtrSource(1))] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_PFI(0))] = U(1),
|
||||
[B(NI_PFI(1))] = U(2),
|
||||
[B(NI_PFI(2))] = U(3),
|
||||
[B(NI_PFI(3))] = U(4),
|
||||
[B(NI_PFI(4))] = U(5),
|
||||
[B(NI_PFI(5))] = U(6),
|
||||
[B(NI_PFI(6))] = U(7),
|
||||
[B(NI_PFI(7))] = U(8),
|
||||
[B(NI_PFI(8))] = U(9),
|
||||
[B(NI_PFI(9))] = U(10),
|
||||
[B(TRIGGER_LINE(0))] = U(11),
|
||||
[B(TRIGGER_LINE(1))] = U(12),
|
||||
[B(TRIGGER_LINE(2))] = U(13),
|
||||
[B(TRIGGER_LINE(3))] = U(14),
|
||||
[B(TRIGGER_LINE(4))] = U(15),
|
||||
[B(TRIGGER_LINE(5))] = U(16),
|
||||
[B(TRIGGER_LINE(6))] = U(17),
|
||||
[B(NI_CtrInternalOutput(0))] = U(19),
|
||||
[B(PXI_Star)] = U(17),
|
||||
[B(NI_20MHzTimebase)] = U(0),
|
||||
[B(NI_100kHzTimebase)] = U(18),
|
||||
[B(NI_LogicLow)] = U(31),
|
||||
},
|
||||
[B(NI_CtrGate(0))] = {
|
||||
[B(NI_PFI(0))] = I(1),
|
||||
[B(NI_PFI(1))] = I(2),
|
||||
[B(NI_PFI(2))] = I(3),
|
||||
[B(NI_PFI(3))] = I(4),
|
||||
[B(NI_PFI(4))] = I(5),
|
||||
[B(NI_PFI(5))] = I(6),
|
||||
[B(NI_PFI(6))] = I(7),
|
||||
[B(NI_PFI(7))] = I(8),
|
||||
[B(NI_PFI(8))] = I(9),
|
||||
[B(NI_PFI(9))] = I(10),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrInternalOutput(1))] = I(20),
|
||||
[B(PXI_Star)] = I(17),
|
||||
[B(NI_AI_StartTrigger)] = I(21),
|
||||
[B(NI_AI_ReferenceTrigger)] = I(18),
|
||||
[B(NI_LogicLow)] = I(31),
|
||||
},
|
||||
[B(NI_CtrGate(1))] = {
|
||||
[B(NI_PFI(0))] = I(1),
|
||||
[B(NI_PFI(1))] = I(2),
|
||||
[B(NI_PFI(2))] = I(3),
|
||||
[B(NI_PFI(3))] = I(4),
|
||||
[B(NI_PFI(4))] = I(5),
|
||||
[B(NI_PFI(5))] = I(6),
|
||||
[B(NI_PFI(6))] = I(7),
|
||||
[B(NI_PFI(7))] = I(8),
|
||||
[B(NI_PFI(8))] = I(9),
|
||||
[B(NI_PFI(9))] = I(10),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrInternalOutput(0))] = I(20),
|
||||
[B(PXI_Star)] = I(17),
|
||||
[B(NI_AI_StartTrigger)] = I(21),
|
||||
[B(NI_AI_ReferenceTrigger)] = I(18),
|
||||
[B(NI_LogicLow)] = I(31),
|
||||
},
|
||||
[B(NI_CtrOut(0))] = {
|
||||
[B(TRIGGER_LINE(0))] = I(1),
|
||||
[B(TRIGGER_LINE(1))] = I(2),
|
||||
[B(TRIGGER_LINE(2))] = I(3),
|
||||
[B(TRIGGER_LINE(3))] = I(4),
|
||||
[B(TRIGGER_LINE(4))] = I(5),
|
||||
[B(TRIGGER_LINE(5))] = I(6),
|
||||
[B(TRIGGER_LINE(6))] = I(7),
|
||||
[B(NI_CtrInternalOutput(0))] = I(0),
|
||||
[B(PXI_Star)] = I(7),
|
||||
},
|
||||
[B(NI_CtrOut(1))] = {
|
||||
[B(NI_CtrInternalOutput(1))] = I(0),
|
||||
},
|
||||
[B(NI_AI_SampleClock)] = {
|
||||
[B(NI_PFI(0))] = I(1),
|
||||
[B(NI_PFI(1))] = I(2),
|
||||
[B(NI_PFI(2))] = I(3),
|
||||
[B(NI_PFI(3))] = I(4),
|
||||
[B(NI_PFI(4))] = I(5),
|
||||
[B(NI_PFI(5))] = I(6),
|
||||
[B(NI_PFI(6))] = I(7),
|
||||
[B(NI_PFI(7))] = I(8),
|
||||
[B(NI_PFI(8))] = I(9),
|
||||
[B(NI_PFI(9))] = I(10),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrInternalOutput(0))] = I(19),
|
||||
[B(PXI_Star)] = I(17),
|
||||
[B(NI_AI_SampleClockTimebase)] = I(0),
|
||||
[B(NI_LogicLow)] = I(31),
|
||||
},
|
||||
[B(NI_AI_SampleClockTimebase)] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_PFI(0))] = U(1),
|
||||
[B(NI_PFI(1))] = U(2),
|
||||
[B(NI_PFI(2))] = U(3),
|
||||
[B(NI_PFI(3))] = U(4),
|
||||
[B(NI_PFI(4))] = U(5),
|
||||
[B(NI_PFI(5))] = U(6),
|
||||
[B(NI_PFI(6))] = U(7),
|
||||
[B(NI_PFI(7))] = U(8),
|
||||
[B(NI_PFI(8))] = U(9),
|
||||
[B(NI_PFI(9))] = U(10),
|
||||
[B(TRIGGER_LINE(0))] = U(11),
|
||||
[B(TRIGGER_LINE(1))] = U(12),
|
||||
[B(TRIGGER_LINE(2))] = U(13),
|
||||
[B(TRIGGER_LINE(3))] = U(14),
|
||||
[B(TRIGGER_LINE(4))] = U(15),
|
||||
[B(TRIGGER_LINE(5))] = U(16),
|
||||
[B(TRIGGER_LINE(6))] = U(17),
|
||||
[B(PXI_Star)] = U(17),
|
||||
[B(NI_20MHzTimebase)] = U(0),
|
||||
[B(NI_100kHzTimebase)] = U(19),
|
||||
[B(NI_LogicLow)] = U(31),
|
||||
},
|
||||
[B(NI_AI_StartTrigger)] = {
|
||||
[B(NI_PFI(0))] = I(1),
|
||||
[B(NI_PFI(1))] = I(2),
|
||||
[B(NI_PFI(2))] = I(3),
|
||||
[B(NI_PFI(3))] = I(4),
|
||||
[B(NI_PFI(4))] = I(5),
|
||||
[B(NI_PFI(5))] = I(6),
|
||||
[B(NI_PFI(6))] = I(7),
|
||||
[B(NI_PFI(7))] = I(8),
|
||||
[B(NI_PFI(8))] = I(9),
|
||||
[B(NI_PFI(9))] = I(10),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrInternalOutput(0))] = I(18),
|
||||
[B(PXI_Star)] = I(17),
|
||||
[B(NI_LogicLow)] = I(31),
|
||||
},
|
||||
[B(NI_AI_ReferenceTrigger)] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_PFI(0))] = U(1),
|
||||
[B(NI_PFI(1))] = U(2),
|
||||
[B(NI_PFI(2))] = U(3),
|
||||
[B(NI_PFI(3))] = U(4),
|
||||
[B(NI_PFI(4))] = U(5),
|
||||
[B(NI_PFI(5))] = U(6),
|
||||
[B(NI_PFI(6))] = U(7),
|
||||
[B(NI_PFI(7))] = U(8),
|
||||
[B(NI_PFI(8))] = U(9),
|
||||
[B(NI_PFI(9))] = U(10),
|
||||
[B(TRIGGER_LINE(0))] = U(11),
|
||||
[B(TRIGGER_LINE(1))] = U(12),
|
||||
[B(TRIGGER_LINE(2))] = U(13),
|
||||
[B(TRIGGER_LINE(3))] = U(14),
|
||||
[B(TRIGGER_LINE(4))] = U(15),
|
||||
[B(TRIGGER_LINE(5))] = U(16),
|
||||
[B(TRIGGER_LINE(6))] = U(17),
|
||||
[B(PXI_Star)] = U(17),
|
||||
[B(NI_LogicLow)] = U(31),
|
||||
},
|
||||
[B(NI_AI_ConvertClock)] = {
|
||||
[B(NI_PFI(0))] = I(1),
|
||||
[B(NI_PFI(1))] = I(2),
|
||||
[B(NI_PFI(2))] = I(3),
|
||||
[B(NI_PFI(3))] = I(4),
|
||||
[B(NI_PFI(4))] = I(5),
|
||||
[B(NI_PFI(5))] = I(6),
|
||||
[B(NI_PFI(6))] = I(7),
|
||||
[B(NI_PFI(7))] = I(8),
|
||||
[B(NI_PFI(8))] = I(9),
|
||||
[B(NI_PFI(9))] = I(10),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrInternalOutput(0))] = I(19),
|
||||
[B(PXI_Star)] = I(17),
|
||||
[B(NI_AI_ConvertClockTimebase)] = I(0),
|
||||
[B(NI_LogicLow)] = I(31),
|
||||
},
|
||||
[B(NI_AI_ConvertClockTimebase)] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_AI_SampleClockTimebase)] = U(0),
|
||||
[B(NI_20MHzTimebase)] = U(1),
|
||||
},
|
||||
[B(NI_AI_PauseTrigger)] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_PFI(0))] = U(1),
|
||||
[B(NI_PFI(1))] = U(2),
|
||||
[B(NI_PFI(2))] = U(3),
|
||||
[B(NI_PFI(3))] = U(4),
|
||||
[B(NI_PFI(4))] = U(5),
|
||||
[B(NI_PFI(5))] = U(6),
|
||||
[B(NI_PFI(6))] = U(7),
|
||||
[B(NI_PFI(7))] = U(8),
|
||||
[B(NI_PFI(8))] = U(9),
|
||||
[B(NI_PFI(9))] = U(10),
|
||||
[B(TRIGGER_LINE(0))] = U(11),
|
||||
[B(TRIGGER_LINE(1))] = U(12),
|
||||
[B(TRIGGER_LINE(2))] = U(13),
|
||||
[B(TRIGGER_LINE(3))] = U(14),
|
||||
[B(TRIGGER_LINE(4))] = U(15),
|
||||
[B(TRIGGER_LINE(5))] = U(16),
|
||||
[B(TRIGGER_LINE(6))] = U(17),
|
||||
[B(PXI_Star)] = U(17),
|
||||
[B(NI_LogicLow)] = U(31),
|
||||
},
|
||||
[B(NI_AO_SampleClock)] = {
|
||||
[B(NI_PFI(0))] = I(1),
|
||||
[B(NI_PFI(1))] = I(2),
|
||||
[B(NI_PFI(2))] = I(3),
|
||||
[B(NI_PFI(3))] = I(4),
|
||||
[B(NI_PFI(4))] = I(5),
|
||||
[B(NI_PFI(5))] = I(6),
|
||||
[B(NI_PFI(6))] = I(7),
|
||||
[B(NI_PFI(7))] = I(8),
|
||||
[B(NI_PFI(8))] = I(9),
|
||||
[B(NI_PFI(9))] = I(10),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(NI_CtrInternalOutput(1))] = I(19),
|
||||
[B(PXI_Star)] = I(17),
|
||||
[B(NI_AO_SampleClockTimebase)] = I(0),
|
||||
[B(NI_LogicLow)] = I(31),
|
||||
},
|
||||
[B(NI_AO_SampleClockTimebase)] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_PFI(0))] = U(1),
|
||||
[B(NI_PFI(1))] = U(2),
|
||||
[B(NI_PFI(2))] = U(3),
|
||||
[B(NI_PFI(3))] = U(4),
|
||||
[B(NI_PFI(4))] = U(5),
|
||||
[B(NI_PFI(5))] = U(6),
|
||||
[B(NI_PFI(6))] = U(7),
|
||||
[B(NI_PFI(7))] = U(8),
|
||||
[B(NI_PFI(8))] = U(9),
|
||||
[B(NI_PFI(9))] = U(10),
|
||||
[B(TRIGGER_LINE(0))] = U(11),
|
||||
[B(TRIGGER_LINE(1))] = U(12),
|
||||
[B(TRIGGER_LINE(2))] = U(13),
|
||||
[B(TRIGGER_LINE(3))] = U(14),
|
||||
[B(TRIGGER_LINE(4))] = U(15),
|
||||
[B(TRIGGER_LINE(5))] = U(16),
|
||||
[B(TRIGGER_LINE(6))] = U(17),
|
||||
[B(PXI_Star)] = U(17),
|
||||
[B(NI_20MHzTimebase)] = U(0),
|
||||
[B(NI_100kHzTimebase)] = U(19),
|
||||
[B(NI_LogicLow)] = U(31),
|
||||
},
|
||||
[B(NI_AO_StartTrigger)] = {
|
||||
[B(NI_PFI(0))] = I(1),
|
||||
[B(NI_PFI(1))] = I(2),
|
||||
[B(NI_PFI(2))] = I(3),
|
||||
[B(NI_PFI(3))] = I(4),
|
||||
[B(NI_PFI(4))] = I(5),
|
||||
[B(NI_PFI(5))] = I(6),
|
||||
[B(NI_PFI(6))] = I(7),
|
||||
[B(NI_PFI(7))] = I(8),
|
||||
[B(NI_PFI(8))] = I(9),
|
||||
[B(NI_PFI(9))] = I(10),
|
||||
[B(TRIGGER_LINE(0))] = I(11),
|
||||
[B(TRIGGER_LINE(1))] = I(12),
|
||||
[B(TRIGGER_LINE(2))] = I(13),
|
||||
[B(TRIGGER_LINE(3))] = I(14),
|
||||
[B(TRIGGER_LINE(4))] = I(15),
|
||||
[B(TRIGGER_LINE(5))] = I(16),
|
||||
[B(TRIGGER_LINE(6))] = I(17),
|
||||
[B(PXI_Star)] = I(17),
|
||||
/*
|
||||
* for the signal route
|
||||
* (NI_AI_StartTrigger->NI_AO_StartTrigger), MHDDK says
|
||||
* used register value 18 and DAQ-STC says 19.
|
||||
* Hoping that the MHDDK is correct--being a "working"
|
||||
* example.
|
||||
*/
|
||||
[B(NI_AI_StartTrigger)] = I(18),
|
||||
[B(NI_LogicLow)] = I(31),
|
||||
},
|
||||
[B(NI_AO_PauseTrigger)] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(NI_PFI(0))] = U(1),
|
||||
[B(NI_PFI(1))] = U(2),
|
||||
[B(NI_PFI(2))] = U(3),
|
||||
[B(NI_PFI(3))] = U(4),
|
||||
[B(NI_PFI(4))] = U(5),
|
||||
[B(NI_PFI(5))] = U(6),
|
||||
[B(NI_PFI(6))] = U(7),
|
||||
[B(NI_PFI(7))] = U(8),
|
||||
[B(NI_PFI(8))] = U(9),
|
||||
[B(NI_PFI(9))] = U(10),
|
||||
[B(TRIGGER_LINE(0))] = U(11),
|
||||
[B(TRIGGER_LINE(1))] = U(12),
|
||||
[B(TRIGGER_LINE(2))] = U(13),
|
||||
[B(TRIGGER_LINE(3))] = U(14),
|
||||
[B(TRIGGER_LINE(4))] = U(15),
|
||||
[B(TRIGGER_LINE(5))] = U(16),
|
||||
[B(TRIGGER_LINE(6))] = U(17),
|
||||
[B(PXI_Star)] = U(17),
|
||||
[B(NI_LogicLow)] = U(31),
|
||||
},
|
||||
[B(NI_MasterTimebase)] = {
|
||||
/* These are not currently implemented in ni modules */
|
||||
[B(TRIGGER_LINE(7))] = U(1),
|
||||
[B(PXI_Star)] = U(2),
|
||||
[B(PXI_Clk10)] = U(3),
|
||||
[B(NI_10MHzRefClock)] = U(0),
|
||||
},
|
||||
/*
|
||||
* This symbol is not defined and nothing for this is
|
||||
* implemented--just including this because data was found in
|
||||
* the NI-STC for it--can't remember where.
|
||||
* [B(NI_FrequencyOutTimebase)] = {
|
||||
* ** These are not currently implemented in ni modules **
|
||||
* [B(NI_20MHzTimebase)] = U(0),
|
||||
* [B(NI_100kHzTimebase)] = U(1),
|
||||
* },
|
||||
*/
|
||||
[B(NI_RGOUT0)] = {
|
||||
[B(NI_CtrInternalOutput(0))] = I(0),
|
||||
[B(NI_CtrOut(0))] = I(1),
|
||||
},
|
||||
},
|
||||
};
|
File diff suppressed because it is too large
Load Diff
7
drivers/staging/comedi/drivers/ni_routing/tools/.gitignore
vendored
Normal file
7
drivers/staging/comedi/drivers/ni_routing/tools/.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
comedi_h.py
|
||||
*.pyc
|
||||
ni_values.py
|
||||
convert_c_to_py
|
||||
c/
|
||||
csv/
|
||||
all_cfiles.c
|
79
drivers/staging/comedi/drivers/ni_routing/tools/Makefile
Normal file
79
drivers/staging/comedi/drivers/ni_routing/tools/Makefile
Normal file
@ -0,0 +1,79 @@
|
||||
# this make file is simply to help autogenerate these files:
|
||||
# ni_route_values.h
|
||||
# ni_device_routes.h
|
||||
# in order to do this, we are also generating a python representation (using
|
||||
# ctypesgen) of ../../comedi.h.
|
||||
# This allows us to sort NI signal/terminal names numerically to use a binary
|
||||
# search through the device_routes tables to find valid routes.
|
||||
|
||||
ALL:
|
||||
@echo Typical targets:
|
||||
@echo "\`make csv-files\`"
|
||||
@echo " Creates new csv-files using content of c-files of existing"
|
||||
@echo " ni_routing/* content. New csv files are placed in csv"
|
||||
@echo " sub-directory."
|
||||
@echo "\`make c-files\`"
|
||||
@echo " Creates new c-files using content of csv sub-directory. These"
|
||||
@echo " new c-files can be compared to the active content in the"
|
||||
@echo " ni_routing directory."
|
||||
@echo "\`make csv-blank\`"
|
||||
@echo " Create a new blank csv file. This is useful for establishing a"
|
||||
@echo " new data table for either a device family \(less likely\) or a"
|
||||
@echo " specific board of an existing device family \(more likely\)."
|
||||
@echo "\`make clean-partial\`"
|
||||
@echo " Remove all generated files/directories EXCEPT for csv/c files."
|
||||
@echo "\`make clean\`"
|
||||
@echo " Remove all generated files/directories."
|
||||
@echo "\`make everything\`"
|
||||
@echo " Build all csv-files, then all new c-files."
|
||||
|
||||
everything : csv-files c-files csv-blank
|
||||
|
||||
CPPFLAGS=-D"BIT(x)=(1UL<<(x))" -D__user=
|
||||
|
||||
comedi_h.py : ../../../comedi.h
|
||||
ctypesgen $< --include "sys/ioctl.h" --cpp 'gcc -E $(CPPFLAGS)' -o $@
|
||||
|
||||
convert_c_to_py: all_cfiles.c
|
||||
gcc -g convert_c_to_py.c -o convert_c_to_py -std=c99
|
||||
|
||||
ni_values.py: convert_c_to_py
|
||||
./convert_c_to_py
|
||||
|
||||
csv-files : ni_values.py comedi_h.py
|
||||
./convert_py_to_csv.py
|
||||
|
||||
csv-blank :
|
||||
./make_blank_csv.py
|
||||
@echo New blank csv signal table in csv/blank_route_table.csv
|
||||
|
||||
c-files : comedi_h.py
|
||||
./convert_csv_to_c.py --route_values --device_routes
|
||||
|
||||
ROUTE_VALUES_SRC=$(wildcard ../ni_route_values/*.c)
|
||||
DEVICE_ROUTES_SRC=$(wildcard ../ni_device_routes/*.c)
|
||||
all_cfiles.c : $(DEVICE_ROUTES_SRC) $(ROUTE_VALUES_SRC)
|
||||
@for i in $(DEVICE_ROUTES_SRC) $(ROUTE_VALUES_SRC); do \
|
||||
echo "#include \"$$i\"" >> all_cfiles.c; \
|
||||
done
|
||||
|
||||
clean-partial :
|
||||
$(RM) -rf comedi_h.py ni_values.py convert_c_to_py all_cfiles.c *.pyc \
|
||||
__pycache__/
|
||||
|
||||
clean : partial_clean
|
||||
$(RM) -rf c/ csv/
|
||||
|
||||
# Note: One could also use ctypeslib in order to generate these files. The
|
||||
# caveat is that ctypeslib does not do a great job at handling macro functions.
|
||||
# The make rules are as follows:
|
||||
# comedi.h.xml : ../../comedi.h
|
||||
# # note that we have to use PWD here to avoid h2xml finding a system
|
||||
# # installed version of the comedilib/comedi.h file
|
||||
# h2xml ${PWD}/../../comedi.h -c -D__user="" -D"BIT(x)=(1<<(x))" \
|
||||
# -o comedi.h.xml
|
||||
#
|
||||
# comedi_h.py : comedi.h.xml
|
||||
# xml2py ./comedi.h.xml -o comedi_h.py
|
||||
# clean :
|
||||
# rm -f comedi.h.xml comedi_h.py comedi_h.pyc
|
@ -0,0 +1,159 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef uint8_t u8;
|
||||
typedef uint16_t u16;
|
||||
typedef int8_t s8;
|
||||
#define __user
|
||||
#define BIT(x) (1UL << (x))
|
||||
|
||||
#define NI_ROUTE_VALUE_EXTERNAL_CONVERSION 1
|
||||
|
||||
#include "../ni_route_values.c"
|
||||
#include "../ni_device_routes.c"
|
||||
#include "all_cfiles.c"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define RVij(rv, src, dest) ((rv)->register_values[(dest)][(src)])
|
||||
|
||||
/*
|
||||
* write out
|
||||
* {
|
||||
* "family" : "<family-name>",
|
||||
* "register_values": {
|
||||
* <destination0>:[src0, src1, ...],
|
||||
* <destination0>:[src0, src1, ...],
|
||||
* ...
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
void family_write(const struct family_route_values *rv, FILE *fp)
|
||||
{
|
||||
fprintf(fp,
|
||||
" \"%s\" : {\n"
|
||||
" # dest -> {src0:val0, src1:val1, ...}\n"
|
||||
, rv->family);
|
||||
for (unsigned int dest = NI_NAMES_BASE;
|
||||
dest < (NI_NAMES_BASE + NI_NUM_NAMES);
|
||||
++dest) {
|
||||
unsigned int src = NI_NAMES_BASE;
|
||||
|
||||
for (; src < (NI_NAMES_BASE + NI_NUM_NAMES) &&
|
||||
RVij(rv, B(src), B(dest)) == 0; ++src)
|
||||
;
|
||||
|
||||
if (src >= (NI_NAMES_BASE + NI_NUM_NAMES))
|
||||
continue; /* no data here */
|
||||
|
||||
fprintf(fp, " %u : {\n", dest);
|
||||
for (src = NI_NAMES_BASE; src < (NI_NAMES_BASE + NI_NUM_NAMES);
|
||||
++src) {
|
||||
register_type r = RVij(rv, B(src), B(dest));
|
||||
const char *M;
|
||||
|
||||
if (r == 0) {
|
||||
continue;
|
||||
} else if (MARKED_V(r)) {
|
||||
M = "V";
|
||||
} else if (MARKED_I(r)) {
|
||||
M = "I";
|
||||
} else if (MARKED_U(r)) {
|
||||
M = "U";
|
||||
} else {
|
||||
fprintf(stderr,
|
||||
"Invalid register marking %s[%u][%u] = %u\n",
|
||||
rv->family, dest, src, r);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
fprintf(fp, " %u : \"%s(%u)\",\n",
|
||||
src, M, UNMARK(r));
|
||||
}
|
||||
fprintf(fp, " },\n");
|
||||
}
|
||||
fprintf(fp, " },\n\n");
|
||||
}
|
||||
|
||||
bool is_valid_ni_sig(unsigned int sig)
|
||||
{
|
||||
return (sig >= NI_NAMES_BASE) && (sig < (NI_NAMES_BASE + NI_NUM_NAMES));
|
||||
}
|
||||
|
||||
/*
|
||||
* write out
|
||||
* {
|
||||
* "family" : "<family-name>",
|
||||
* "register_values": {
|
||||
* <destination0>:[src0, src1, ...],
|
||||
* <destination0>:[src0, src1, ...],
|
||||
* ...
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
void device_write(const struct ni_device_routes *dR, FILE *fp)
|
||||
{
|
||||
fprintf(fp,
|
||||
" \"%s\" : {\n"
|
||||
" # dest -> [src0, src1, ...]\n"
|
||||
, dR->device);
|
||||
|
||||
unsigned int i = 0;
|
||||
|
||||
while (dR->routes[i].dest != 0) {
|
||||
if (!is_valid_ni_sig(dR->routes[i].dest)) {
|
||||
fprintf(stderr,
|
||||
"Invalid NI signal value [%u] for destination %s.[%u]\n",
|
||||
dR->routes[i].dest, dR->device, i);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
fprintf(fp, " %u : [", dR->routes[i].dest);
|
||||
|
||||
unsigned int j = 0;
|
||||
|
||||
while (dR->routes[i].src[j] != 0) {
|
||||
if (!is_valid_ni_sig(dR->routes[i].src[j])) {
|
||||
fprintf(stderr,
|
||||
"Invalid NI signal value [%u] for source %s.[%u].[%u]\n",
|
||||
dR->routes[i].src[j], dR->device, i, j);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
fprintf(fp, "%u,", dR->routes[i].src[j]);
|
||||
|
||||
++j;
|
||||
}
|
||||
fprintf(fp, "],\n");
|
||||
|
||||
++i;
|
||||
}
|
||||
fprintf(fp, " },\n\n");
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
FILE *fp = fopen("ni_values.py", "w");
|
||||
|
||||
/* write route register values */
|
||||
fprintf(fp, "ni_route_values = {\n");
|
||||
for (int i = 0; ni_all_route_values[i]; ++i)
|
||||
family_write(ni_all_route_values[i], fp);
|
||||
fprintf(fp, "}\n\n");
|
||||
|
||||
/* write valid device routes */
|
||||
fprintf(fp, "ni_device_routes = {\n");
|
||||
for (int i = 0; ni_device_routes_list[i]; ++i)
|
||||
device_write(ni_device_routes_list[i], fp);
|
||||
fprintf(fp, "}\n");
|
||||
|
||||
/* finish; close file */
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
503
drivers/staging/comedi/drivers/ni_routing/tools/convert_csv_to_c.py
Executable file
503
drivers/staging/comedi/drivers/ni_routing/tools/convert_csv_to_c.py
Executable file
@ -0,0 +1,503 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
# vim: ts=2:sw=2:et:tw=80:nowrap
|
||||
|
||||
# This is simply to aide in creating the entries in the order of the value of
|
||||
# the device-global NI signal/terminal constants defined in comedi.h
|
||||
import comedi_h
|
||||
import os, sys, re
|
||||
from csv_collection import CSVCollection
|
||||
|
||||
|
||||
def c_to_o(filename, prefix='\t\t\t\t\t ni_routing/', suffix=' \\'):
|
||||
if not filename.endswith('.c'):
|
||||
return ''
|
||||
return prefix + filename.rpartition('.c')[0] + '.o' + suffix
|
||||
|
||||
|
||||
def routedict_to_structinit_single(name, D, return_name=False):
|
||||
Locals = dict()
|
||||
lines = [
|
||||
'\t.family = "{}",'.format(name),
|
||||
'\t.register_values = {',
|
||||
'\t\t/*',
|
||||
'\t\t * destination = {',
|
||||
'\t\t * source = register value,',
|
||||
'\t\t * ...',
|
||||
'\t\t * }',
|
||||
'\t\t */',
|
||||
]
|
||||
if (False):
|
||||
# print table with index0:src, index1:dest
|
||||
D0 = D # (src-> dest->reg_value)
|
||||
#D1 : destD
|
||||
else:
|
||||
D0 = dict()
|
||||
for src, destD in D.items():
|
||||
for dest, val in destD.items():
|
||||
D0.setdefault(dest, {})[src] = val
|
||||
|
||||
|
||||
D0 = sorted(D0.items(), key=lambda i: eval(i[0], comedi_h.__dict__, Locals))
|
||||
|
||||
for D0_sig, D1_D in D0:
|
||||
D1 = sorted(D1_D.items(), key=lambda i: eval(i[0], comedi_h.__dict__, Locals))
|
||||
|
||||
lines.append('\t\t[B({})] = {{'.format(D0_sig))
|
||||
for D1_sig, value in D1:
|
||||
if not re.match('[VIU]\([^)]*\)', value):
|
||||
sys.stderr.write('Invalid register format: {}\n'.format(repr(value)))
|
||||
sys.stderr.write(
|
||||
'Register values should be formatted with V(),I(),or U()\n')
|
||||
raise RuntimeError('Invalid register values format')
|
||||
lines.append('\t\t\t[B({})]\t= {},'.format(D1_sig, value))
|
||||
lines.append('\t\t},')
|
||||
lines.append('\t},')
|
||||
|
||||
lines = '\n'.join(lines)
|
||||
if return_name:
|
||||
return N, lines
|
||||
else:
|
||||
return lines
|
||||
|
||||
|
||||
def routedict_to_routelist_single(name, D, indent=1):
|
||||
Locals = dict()
|
||||
|
||||
indents = dict(
|
||||
I0 = '\t'*(indent),
|
||||
I1 = '\t'*(indent+1),
|
||||
I2 = '\t'*(indent+2),
|
||||
I3 = '\t'*(indent+3),
|
||||
I4 = '\t'*(indent+4),
|
||||
)
|
||||
|
||||
if (False):
|
||||
# data is src -> dest-list
|
||||
D0 = D
|
||||
keyname = 'src'
|
||||
valname = 'dest'
|
||||
else:
|
||||
# data is dest -> src-list
|
||||
keyname = 'dest'
|
||||
valname = 'src'
|
||||
D0 = dict()
|
||||
for src, destD in D.items():
|
||||
for dest, val in destD.items():
|
||||
D0.setdefault(dest, {})[src] = val
|
||||
|
||||
# Sort by order of device-global names (numerically)
|
||||
D0 = sorted(D0.items(), key=lambda i: eval(i[0], comedi_h.__dict__, Locals))
|
||||
|
||||
lines = [ '{I0}.device = "{name}",\n'
|
||||
'{I0}.routes = (struct ni_route_set[]){{'
|
||||
.format(name=name, **indents) ]
|
||||
for D0_sig, D1_D in D0:
|
||||
D1 = [ k for k,v in D1_D.items() if v ]
|
||||
D1.sort(key=lambda i: eval(i, comedi_h.__dict__, Locals))
|
||||
|
||||
lines.append('{I1}{{\n{I2}.{keyname} = {D0_sig},\n'
|
||||
'{I2}.{valname} = (int[]){{'
|
||||
.format(keyname=keyname, valname=valname, D0_sig=D0_sig, **indents)
|
||||
)
|
||||
for D1_sig in D1:
|
||||
lines.append( '{I3}{D1_sig},'.format(D1_sig=D1_sig, **indents) )
|
||||
lines.append( '{I3}0, /* Termination */'.format(**indents) )
|
||||
|
||||
lines.append('{I2}}}\n{I1}}},'.format(**indents))
|
||||
|
||||
lines.append('{I1}{{ /* Termination of list */\n{I2}.{keyname} = 0,\n{I1}}},'
|
||||
.format(keyname=keyname, **indents))
|
||||
|
||||
lines.append('{I0}}},'.format(**indents))
|
||||
|
||||
return '\n'.join(lines)
|
||||
|
||||
|
||||
class DeviceRoutes(CSVCollection):
|
||||
MKFILE_SEGMENTS = 'device-route.mk'
|
||||
SET_C = 'ni_device_routes.c'
|
||||
ITEMS_DIR = 'ni_device_routes'
|
||||
EXTERN_H = 'all.h'
|
||||
OUTPUT_DIR = 'c'
|
||||
|
||||
output_file_top = """\
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/{filename}
|
||||
* 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 "{extern_h}"\
|
||||
""".format(filename=SET_C, extern_h=os.path.join(ITEMS_DIR, EXTERN_H))
|
||||
|
||||
extern_header = """\
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/{filename}
|
||||
* 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"
|
||||
|
||||
{externs}
|
||||
|
||||
#endif //_COMEDI_DRIVERS_NI_ROUTING_NI_DEVICE_ROUTES_EXTERN_H
|
||||
"""
|
||||
|
||||
single_output_file_top = """\
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/{filename}
|
||||
* 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 "{extern_h}"
|
||||
|
||||
struct ni_device_routes {table_name} = {{\
|
||||
"""
|
||||
|
||||
def __init__(self, pattern='csv/device_routes/*.csv'):
|
||||
super(DeviceRoutes,self).__init__(pattern)
|
||||
|
||||
def to_listinit(self):
|
||||
chunks = [ self.output_file_top,
|
||||
'',
|
||||
'struct ni_device_routes *const ni_device_routes_list[] = {'
|
||||
]
|
||||
# put the sheets in lexical order of device numbers then bus
|
||||
sheets = sorted(self.items(), key=lambda i : tuple(i[0].split('-')[::-1]) )
|
||||
|
||||
externs = []
|
||||
objs = [c_to_o(self.SET_C)]
|
||||
|
||||
for sheet,D in sheets:
|
||||
S = sheet.lower()
|
||||
dev_table_name = 'ni_{}_device_routes'.format(S.replace('-','_'))
|
||||
sheet_filename = os.path.join(self.ITEMS_DIR,'{}.c'.format(S))
|
||||
externs.append('extern struct ni_device_routes {};'.format(dev_table_name))
|
||||
|
||||
chunks.append('\t&{},'.format(dev_table_name))
|
||||
|
||||
s_chunks = [
|
||||
self.single_output_file_top.format(
|
||||
filename = sheet_filename,
|
||||
table_name = dev_table_name,
|
||||
extern_h = self.EXTERN_H,
|
||||
),
|
||||
routedict_to_routelist_single(S, D),
|
||||
'};',
|
||||
]
|
||||
|
||||
objs.append(c_to_o(sheet_filename))
|
||||
|
||||
with open(os.path.join(self.OUTPUT_DIR, sheet_filename), 'w') as f:
|
||||
f.write('\n'.join(s_chunks))
|
||||
f.write('\n')
|
||||
|
||||
with open(os.path.join(self.OUTPUT_DIR, self.MKFILE_SEGMENTS), 'w') as f:
|
||||
f.write('# This is the segment that should be included in comedi/drivers/Makefile\n')
|
||||
f.write('ni_routing-objs\t\t\t\t+= \\\n')
|
||||
f.write('\n'.join(objs))
|
||||
f.write('\n')
|
||||
|
||||
EXTERN_H = os.path.join(self.ITEMS_DIR, self.EXTERN_H)
|
||||
with open(os.path.join(self.OUTPUT_DIR, EXTERN_H), 'w') as f:
|
||||
f.write(self.extern_header.format(
|
||||
filename=EXTERN_H, externs='\n'.join(externs)))
|
||||
|
||||
chunks.append('\tNULL,') # terminate list
|
||||
chunks.append('};')
|
||||
return '\n'.join(chunks)
|
||||
|
||||
def save(self):
|
||||
filename=os.path.join(self.OUTPUT_DIR, self.SET_C)
|
||||
|
||||
try:
|
||||
os.makedirs(os.path.join(self.OUTPUT_DIR, self.ITEMS_DIR))
|
||||
except:
|
||||
pass
|
||||
with open(filename,'w') as f:
|
||||
f.write( self.to_listinit() )
|
||||
f.write( '\n' )
|
||||
|
||||
|
||||
class RouteValues(CSVCollection):
|
||||
MKFILE_SEGMENTS = 'route-values.mk'
|
||||
SET_C = 'ni_route_values.c'
|
||||
ITEMS_DIR = 'ni_route_values'
|
||||
EXTERN_H = 'all.h'
|
||||
OUTPUT_DIR = 'c'
|
||||
|
||||
output_file_top = """\
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/{filename}
|
||||
* Route information for 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 includes the tables that are a list of all the values of various
|
||||
* signals routes available on NI hardware. In many cases, one does not
|
||||
* explicitly make these routes, rather one might indicate that something is
|
||||
* used as the source of one particular trigger or another (using
|
||||
* *_src=TRIG_EXT).
|
||||
*
|
||||
* 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_route_values.h"
|
||||
#include "{extern_h}"\
|
||||
""".format(filename=SET_C, extern_h=os.path.join(ITEMS_DIR, EXTERN_H))
|
||||
|
||||
extern_header = """\
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/{filename}
|
||||
* 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_ROUTE_VALUES_EXTERN_H
|
||||
#define _COMEDI_DRIVERS_NI_ROUTING_NI_ROUTE_VALUES_EXTERN_H
|
||||
|
||||
#include "../ni_route_values.h"
|
||||
|
||||
{externs}
|
||||
|
||||
#endif //_COMEDI_DRIVERS_NI_ROUTING_NI_ROUTE_VALUES_EXTERN_H
|
||||
"""
|
||||
|
||||
single_output_file_top = """\
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* vim: set ts=8 sw=8 noet tw=80 nowrap: */
|
||||
/*
|
||||
* comedi/drivers/ni_routing/{filename}
|
||||
* Route information for {sheet} 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 includes a list of all the values of various signals routes
|
||||
* available on NI 660x hardware. In many cases, one does not explicitly make
|
||||
* these routes, rather one might indicate that something is used as the source
|
||||
* of one particular trigger or another (using *_src=TRIG_EXT).
|
||||
*
|
||||
* The contents of this file can be generated using the tools in
|
||||
* comedi/drivers/ni_routing/tools. This file also contains specific notes to
|
||||
* this family of devices.
|
||||
*
|
||||
* Please use those tools to help maintain the contents of this file, but be
|
||||
* mindful to not lose the notes already made in this file, since these notes
|
||||
* are critical to a complete undertsanding of the register values of this
|
||||
* family.
|
||||
*/
|
||||
|
||||
#include "../ni_route_values.h"
|
||||
#include "{extern_h}"
|
||||
|
||||
const struct family_route_values {table_name} = {{\
|
||||
"""
|
||||
|
||||
def __init__(self, pattern='csv/route_values/*.csv'):
|
||||
super(RouteValues,self).__init__(pattern)
|
||||
|
||||
def to_structinit(self):
|
||||
chunks = [ self.output_file_top,
|
||||
'',
|
||||
'const struct family_route_values *const ni_all_route_values[] = {'
|
||||
]
|
||||
# put the sheets in lexical order for consistency
|
||||
sheets = sorted(self.items(), key=lambda i : i[0] )
|
||||
|
||||
externs = []
|
||||
objs = [c_to_o(self.SET_C)]
|
||||
|
||||
for sheet,D in sheets:
|
||||
S = sheet.lower()
|
||||
fam_table_name = '{}_route_values'.format(S.replace('-','_'))
|
||||
sheet_filename = os.path.join(self.ITEMS_DIR,'{}.c'.format(S))
|
||||
externs.append('extern const struct family_route_values {};'.format(fam_table_name))
|
||||
|
||||
chunks.append('\t&{},'.format(fam_table_name))
|
||||
|
||||
s_chunks = [
|
||||
self.single_output_file_top.format(
|
||||
filename = sheet_filename,
|
||||
sheet = sheet.upper(),
|
||||
table_name = fam_table_name,
|
||||
extern_h = self.EXTERN_H,
|
||||
),
|
||||
routedict_to_structinit_single(S, D),
|
||||
'};',
|
||||
]
|
||||
|
||||
objs.append(c_to_o(sheet_filename))
|
||||
|
||||
with open(os.path.join(self.OUTPUT_DIR, sheet_filename), 'w') as f:
|
||||
f.write('\n'.join(s_chunks))
|
||||
f.write( '\n' )
|
||||
|
||||
with open(os.path.join(self.OUTPUT_DIR, self.MKFILE_SEGMENTS), 'w') as f:
|
||||
f.write('# This is the segment that should be included in comedi/drivers/Makefile\n')
|
||||
f.write('ni_routing-objs\t\t\t\t+= \\\n')
|
||||
f.write('\n'.join(objs))
|
||||
f.write('\n')
|
||||
|
||||
EXTERN_H = os.path.join(self.ITEMS_DIR, self.EXTERN_H)
|
||||
with open(os.path.join(self.OUTPUT_DIR, EXTERN_H), 'w') as f:
|
||||
f.write(self.extern_header.format(
|
||||
filename=EXTERN_H, externs='\n'.join(externs)))
|
||||
|
||||
chunks.append('\tNULL,') # terminate list
|
||||
chunks.append('};')
|
||||
return '\n'.join(chunks)
|
||||
|
||||
def save(self):
|
||||
filename=os.path.join(self.OUTPUT_DIR, self.SET_C)
|
||||
|
||||
try:
|
||||
os.makedirs(os.path.join(self.OUTPUT_DIR, self.ITEMS_DIR))
|
||||
except:
|
||||
pass
|
||||
with open(filename,'w') as f:
|
||||
f.write( self.to_structinit() )
|
||||
f.write( '\n' )
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import argparse
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument( '--route_values', action='store_true',
|
||||
help='Extract route values from csv/route_values/*.csv' )
|
||||
parser.add_argument( '--device_routes', action='store_true',
|
||||
help='Extract route values from csv/device_routes/*.csv' )
|
||||
args = parser.parse_args()
|
||||
KL = list()
|
||||
if args.route_values:
|
||||
KL.append( RouteValues )
|
||||
if args.device_routes:
|
||||
KL.append( DeviceRoutes )
|
||||
if not KL:
|
||||
parser.error('nothing to do...')
|
||||
for K in KL:
|
||||
doc = K()
|
||||
doc.save()
|
67
drivers/staging/comedi/drivers/ni_routing/tools/convert_py_to_csv.py
Executable file
67
drivers/staging/comedi/drivers/ni_routing/tools/convert_py_to_csv.py
Executable file
@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
# vim: ts=2:sw=2:et:tw=80:nowrap
|
||||
|
||||
from os import path
|
||||
import os, csv
|
||||
from itertools import chain
|
||||
|
||||
from csv_collection import CSVCollection
|
||||
from ni_names import value_to_name
|
||||
import ni_values
|
||||
|
||||
CSV_DIR = 'csv'
|
||||
|
||||
def iter_src_values(D):
|
||||
return D.items()
|
||||
|
||||
def iter_src(D):
|
||||
for dest in D:
|
||||
yield dest, 1
|
||||
|
||||
def create_csv(name, D, src_iter):
|
||||
# have to change dest->{src:val} to src->{dest:val}
|
||||
fieldnames = [value_to_name[i] for i in sorted(D.keys())]
|
||||
fieldnames.insert(0, CSVCollection.source_column_name)
|
||||
|
||||
S = dict()
|
||||
for dest, srcD in D.items():
|
||||
for src,val in src_iter(srcD):
|
||||
S.setdefault(src,{})[dest] = val
|
||||
|
||||
S = sorted(S.items(), key = lambda src_destD : src_destD[0])
|
||||
|
||||
|
||||
csv_fname = path.join(CSV_DIR, name + '.csv')
|
||||
with open(csv_fname, 'w') as F_csv:
|
||||
dR = csv.DictWriter(F_csv, fieldnames, delimiter=';', quotechar='"')
|
||||
dR.writeheader()
|
||||
|
||||
# now change the json back into the csv dictionaries
|
||||
rows = [
|
||||
dict(chain(
|
||||
((CSVCollection.source_column_name,value_to_name[src]),),
|
||||
*(((value_to_name[dest],v),) for dest,v in destD.items())
|
||||
))
|
||||
for src, destD in S
|
||||
]
|
||||
|
||||
dR.writerows(rows)
|
||||
|
||||
|
||||
def to_csv():
|
||||
for d in ['route_values', 'device_routes']:
|
||||
try:
|
||||
os.makedirs(path.join(CSV_DIR,d))
|
||||
except:
|
||||
pass
|
||||
|
||||
for family, dst_src_map in ni_values.ni_route_values.items():
|
||||
create_csv(path.join('route_values',family), dst_src_map, iter_src_values)
|
||||
|
||||
for device, dst_src_map in ni_values.ni_device_routes.items():
|
||||
create_csv(path.join('device_routes',device), dst_src_map, iter_src)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
to_csv()
|
@ -0,0 +1,40 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
# vim: ts=2:sw=2:et:tw=80:nowrap
|
||||
|
||||
import os, csv, glob
|
||||
|
||||
class CSVCollection(dict):
|
||||
delimiter=';'
|
||||
quotechar='"'
|
||||
source_column_name = 'Sources / Destinations'
|
||||
|
||||
"""
|
||||
This class is a dictionary representation of the collection of sheets that
|
||||
exist in a given .ODS file.
|
||||
"""
|
||||
def __init__(self, pattern, skip_commented_lines=True, strip_lines=True):
|
||||
super(CSVCollection, self).__init__()
|
||||
self.pattern = pattern
|
||||
C = '#' if skip_commented_lines else 'blahblahblah'
|
||||
|
||||
if strip_lines:
|
||||
strip = lambda s:s.strip()
|
||||
else:
|
||||
strip = lambda s:s
|
||||
|
||||
# load all CSV files
|
||||
key = self.source_column_name
|
||||
for fname in glob.glob(pattern):
|
||||
with open(fname) as F:
|
||||
dR = csv.DictReader(F, delimiter=self.delimiter,
|
||||
quotechar=self.quotechar)
|
||||
name = os.path.basename(fname).partition('.')[0]
|
||||
D = {
|
||||
r[key]:{f:strip(c) for f,c in r.items()
|
||||
if f != key and f[:1] not in ['', C] and
|
||||
strip(c)[:1] not in ['', C]}
|
||||
for r in dR if r[key][:1] not in ['', C]
|
||||
}
|
||||
# now, go back through and eliminate all empty dictionaries
|
||||
D = {k:v for k,v in D.items() if v}
|
||||
self[name] = D
|
32
drivers/staging/comedi/drivers/ni_routing/tools/make_blank_csv.py
Executable file
32
drivers/staging/comedi/drivers/ni_routing/tools/make_blank_csv.py
Executable file
@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
# vim: ts=2:sw=2:et:tw=80:nowrap
|
||||
|
||||
from os import path
|
||||
import os, csv
|
||||
|
||||
from csv_collection import CSVCollection
|
||||
from ni_names import value_to_name
|
||||
|
||||
CSV_DIR = 'csv'
|
||||
|
||||
def to_csv():
|
||||
try:
|
||||
os.makedirs(CSV_DIR)
|
||||
except:
|
||||
pass
|
||||
|
||||
csv_fname = path.join(CSV_DIR, 'blank_route_table.csv')
|
||||
|
||||
fieldnames = [sig for sig_val, sig in sorted(value_to_name.items())]
|
||||
fieldnames.insert(0, CSVCollection.source_column_name)
|
||||
|
||||
with open(csv_fname, 'w') as F_csv:
|
||||
dR = csv.DictWriter(F_csv, fieldnames, delimiter=';', quotechar='"')
|
||||
dR.writeheader()
|
||||
|
||||
for sig in fieldnames[1:]:
|
||||
dR.writerow({CSVCollection.source_column_name: sig})
|
||||
|
||||
if __name__ == '__main__':
|
||||
to_csv()
|
56
drivers/staging/comedi/drivers/ni_routing/tools/ni_names.py
Normal file
56
drivers/staging/comedi/drivers/ni_routing/tools/ni_names.py
Normal file
@ -0,0 +1,56 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
# vim: ts=2:sw=2:et:tw=80:nowrap
|
||||
"""
|
||||
This file helps to extract string names of NI signals as included in comedi.h
|
||||
between NI_NAMES_BASE and NI_NAMES_BASE+NI_NUM_NAMES.
|
||||
"""
|
||||
|
||||
# This is simply to aide in creating the entries in the order of the value of
|
||||
# the device-global NI signal/terminal constants defined in comedi.h
|
||||
import comedi_h
|
||||
|
||||
|
||||
ni_macros = (
|
||||
'NI_PFI',
|
||||
'TRIGGER_LINE',
|
||||
'NI_RTSI_BRD',
|
||||
'NI_CtrSource',
|
||||
'NI_CtrGate',
|
||||
'NI_CtrAux',
|
||||
'NI_CtrA',
|
||||
'NI_CtrB',
|
||||
'NI_CtrZ',
|
||||
'NI_CtrArmStartTrigger',
|
||||
'NI_CtrInternalOutput',
|
||||
'NI_CtrOut',
|
||||
'NI_CtrSampleClock',
|
||||
)
|
||||
|
||||
def get_ni_names():
|
||||
name_dict = dict()
|
||||
|
||||
# load all the static names; start with those that do not begin with NI_
|
||||
name_dict['PXI_Star'] = comedi_h.PXI_Star
|
||||
name_dict['PXI_Clk10'] = comedi_h.PXI_Clk10
|
||||
|
||||
#load all macro values
|
||||
for fun in ni_macros:
|
||||
f = getattr(comedi_h, fun)
|
||||
name_dict.update({
|
||||
'{}({})'.format(fun,i):f(i) for i in range(1 + f(-1) - f(0))
|
||||
})
|
||||
|
||||
#load everything else in ni_common_signal_names enum
|
||||
name_dict.update({
|
||||
k:v for k,v in comedi_h.__dict__.items()
|
||||
if k.startswith('NI_') and (not callable(v)) and
|
||||
comedi_h.NI_COUNTER_NAMES_MAX < v < (comedi_h.NI_NAMES_BASE + comedi_h.NI_NUM_NAMES)
|
||||
})
|
||||
|
||||
# now create reverse lookup (value -> name)
|
||||
|
||||
val_dict = {v:k for k,v in name_dict.items()}
|
||||
|
||||
return name_dict, val_dict
|
||||
|
||||
name_to_value, value_to_name = get_ni_names()
|
Loading…
Reference in New Issue
Block a user