drivers/comedi/drivers/ni_routing/ni_route_values/ni_mseries.c

Source file repositories/reference/linux-study-clean/drivers/comedi/drivers/ni_routing/ni_route_values/ni_mseries.c

File Facts

System
Linux kernel
Corpus path
drivers/comedi/drivers/ni_routing/ni_route_values/ni_mseries.c
Extension
.c
Size
54958 bytes
Lines
1752
Domain
Driver Families
Bucket
drivers/comedi
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: GPL-2.0+
/*
 *  comedi/drivers/ni_routing/ni_route_values/ni_mseries.c
 *  Route information for NI_MSERIES 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"

/*
 * GATE SELECT NOTE:
 * CtrAux and CtrArmStartrigger register values are not documented in the
 * DAQ-STC.  There is some evidence that using CtrGate values is valid (see
 * comedi.h).  Some information and hints exist in the M-Series user manual
 * (ni-62xx user-manual 371022K-01).
 */

const struct family_route_values ni_mseries_route_values = {
	.family = "ni_mseries",
	.register_values = {
		/*
		 * destination = {
		 *              source          = register value,
		 *              ...
		 * }
		 */
		[B(NI_PFI(0))] = {
			[B(TRIGGER_LINE(0))]	= I(18),
			[B(TRIGGER_LINE(1))]	= I(19),
			[B(TRIGGER_LINE(2))]	= I(20),
			[B(TRIGGER_LINE(3))]	= I(21),
			[B(TRIGGER_LINE(4))]	= I(22),
			[B(TRIGGER_LINE(5))]	= I(23),
			[B(TRIGGER_LINE(6))]	= I(24),
			[B(TRIGGER_LINE(7))]	= I(25),
			[B(NI_CtrSource(0))]	= I(9),
			[B(NI_CtrSource(1))]	= I(4),
			[B(NI_CtrGate(0))]	= I(10),
			[B(NI_CtrGate(1))]	= I(5),
			[B(NI_CtrInternalOutput(0))]	= I(13),
			[B(NI_CtrInternalOutput(1))]	= I(14),
			[B(PXI_Star)]	= I(26),
			[B(NI_AI_SampleClock)]	= I(8),
			[B(NI_AI_StartTrigger)]	= I(1),
			[B(NI_AI_ReferenceTrigger)]	= I(2),
			[B(NI_AI_ConvertClock)]	= I(3),
			[B(NI_AI_ExternalMUXClock)]	= I(12),
			[B(NI_AO_SampleClock)]	= I(6),
			[B(NI_AO_StartTrigger)]	= I(7),
			[B(NI_DI_SampleClock)]	= I(29),
			[B(NI_DO_SampleClock)]	= I(30),
			[B(NI_FrequencyOutput)]	= I(15),
			[B(NI_ChangeDetectionEvent)]	= I(28),
			[B(NI_AnalogComparisonEvent)]	= I(17),
			[B(NI_SCXI_Trig1)]	= I(27),
			[B(NI_ExternalStrobe)]	= I(11),
			[B(NI_PFI_DO)]	= I(16),
		},
		[B(NI_PFI(1))] = {
			[B(TRIGGER_LINE(0))]	= I(18),
			[B(TRIGGER_LINE(1))]	= I(19),

Annotation

Implementation Notes