// SPDX-License-Identifier: GPL-2.0+ /* * COMEDI driver for Advantech PCI-1720U * Copyright (c) 2015 H Hartley Sweeten <hsweeten@visionengravers.com> * * Separated from the adv_pci1710 driver written by: * Michal Dobes <dobes@tesnet.cz> * * COMEDI - Linux Control and Measurement Device Interface * Copyright (C) 2000 David A. Schleef <ds@schleef.org>
*/
/* * Driver: adv_pci1720 * Description: 4-channel Isolated D/A Output board * Devices: [Advantech] PCI-7120U (adv_pci1720) * Author: H Hartley Sweeten <hsweeten@visionengravers.com> * Updated: Fri, 29 Oct 2015 17:19:35 -0700 * Status: untested * * Configuration options: not applicable, uses PCI auto config * * The PCI-1720 has 4 isolated 12-bit analog output channels with multiple * output ranges. It also has a BoardID switch to allow differentiating * multiple boards in the system. * * The analog outputs can operate in two modes, immediate and synchronized. * This driver currently does not support the synchronized output mode. * * Jumpers JP1 to JP4 are used to set the current sink ranges for each * analog output channel. In order to use the current sink ranges, the * unipolar 5V range must be used. The voltage output and sink output for * each channel is available on the connector as separate pins. * * Jumper JP5 controls the "hot" reset state of the analog outputs. * Depending on its setting, the analog outputs will either keep the * last settings and output values or reset to the default state after * a "hot" reset. The default state for all channels is uniploar 5V range * and all the output values are 0V. To allow this feature to work, the * analog outputs are not "reset" when the driver attaches.
*/
/* set the channel range and polarity */
val = inb(dev->iobase + PCI1720_AO_RANGE_REG);
val &= ~PCI1720_AO_RANGE_MASK(chan);
val |= PCI1720_AO_RANGE(chan, range);
outb(val, dev->iobase + PCI1720_AO_RANGE_REG);
val = s->readback[chan]; for (i = 0; i < insn->n; i++) {
val = data[i];
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.