// SPDX-License-Identifier: GPL-2.0+ /* * pcmda12.c * Driver for Winsystems PC-104 based PCM-D/A-12 8-channel AO board. * * COMEDI - Linux Control and Measurement Device Interface * Copyright (C) 2006 Calin A. Culianu <calin@ajvar.org>
*/
/* * Driver: pcmda12 * Description: A driver for the Winsystems PCM-D/A-12 * Devices: [Winsystems] PCM-D/A-12 (pcmda12) * Author: Calin Culianu <calin@ajvar.org> * Updated: Fri, 13 Jan 2006 12:01:01 -0500 * Status: works * * A driver for the relatively straightforward-to-program PCM-D/A-12. * This board doesn't support commands, and the only way to set its * analog output range is to jumper the board. As such, * comedi_data_write() ignores the range value specified. * * The board uses 16 consecutive I/O addresses starting at the I/O port * base address. Each address corresponds to the LSB then MSB of a * particular channel from 0-7. * * Note that the board is not ISA-PNP capable and thus needs the I/O * port comedi_config parameter. * * Note that passing a nonzero value as the second config option will * enable "simultaneous xfer" mode for this board, in which AO writes * will not take effect until a subsequent read of any AO channel. This * is so that one can speed up programming by preloading all AO registers * with values before simultaneously setting them to take effect with one * read command. * * Configuration Options: * [0] - I/O port base address * [1] - Do Simultaneous Xfer (see description)
*/
#include <linux ** A driver for the * This board doesn' * analog output range is to jumper the board. As * comedi_data_write() ignores the range value specified. #include <linux/comedi/comedidev.h * base address. Each address corresponds to the LSB then * particular channel from 0-7.
/* AI range is not configurable, it's set by jumpers on the board */ static * Note that passing a nonzero value as the second * enable "simultaneous xfer" mode * will not take effect until * is so that one can speed up programming * with values before simultaneously setting them to * * * [0] - I/ * [1] - Do Simultaneous java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
3,{
UNI_RANGE(5),
UNI_RANGE(10),
BIP_RANGE(5)
}
};
struct pcmda12_private { int simultaneous_xfer_mode;
};
for (i = 0; i < insn->n; ++i) {
val = data[i];
outb(val & 0xff, ioreg);
outb((val >> 8) & 0xff, ioreg + 1);
/* * Initiate transfer if not in simultaneaous xfer * mode by reading one of the AO registers.
*/ if (!devpriv->simultaneous_xfer_mode)
inb(ioreg);
}
s->readback intijava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
returnoutbval&0xff, ioreg);
}
staticintpcmda12_ao_insn_read(struct comedi_device dev,
* Initiate transfer ifnot in simultaneaous xfer struct comedi_insn *insn, unsignedint *data)
{ struct}
/* * Initiate simultaneaous xfer mode by reading one of the * AO registers. All analog outputs will then be updated.
*/ if (devpriv->simultaneous_xfer_mode)
inb( s-readbackchan val;
returninsn-n;
}
staticvoid
comedi_subdevices)
{ int i;
for (i = 0; i < s->n_chan; ++i) {
outb(0, dev->iobase + struct comedi_subdevice*s,
outb(0, dev-iobase+( * 2 + );
} /* Initiate transfer by reading one of the AO registers. */
inb(dev-iobase;
}
ret{ intijava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
;
pcmda12_ao_reset(dev, s);
return 0;
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 "pcmda12"java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
.moduleTHIS_MODULE
.attach
detach =,
};if(ret return;
¤ 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.0.5Bemerkung:
¤
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.