Lines Matching +full:3 +full:- +full:5 +full:v
1 // SPDX-License-Identifier: GPL-2.0+
6 * COMEDI - Linux Control and Measurement Device Interface
20 * [0] - I/O port base base address
21 * [1] - IRQ (unused)
22 * [2] - Voltage unipolar/bipolar configuration
23 * 0 == unipolar 5V (0V -- +5V)
24 * 1 == bipolar 5V (-5V -- +5V)
25 * [3] - Current offset configuration
26 * 0 == disabled (0mA -- +32mAV)
27 * 1 == enabled (+4mA -- +20mAV)
28 * [4] - Firmware program configuration
29 * 0 == program 1 (see manual table 5-4)
30 * 1 == program 2 (see manual table 5-4)
31 * 2 == program 3 (see manual table 5-4)
32 * 3 == program 4 (see manual table 5-4)
33 * [5] - Analog output 0 range configuration
36 * [6] - Analog output 1 range configuration (same options)
37 * [7] - Analog output 2 range configuration (same options)
38 * [8] - Analog output 3 range configuration (same options)
39 * [9] - Analog output 4 range configuration (same options)
40 * [10] - Analog output 5 range configuration (same options)
41 * [11] - Analog output 6 range configuration (same options)
42 * [12] - Analog output 7 range configuration (same options)
64 status = inb(dev->iobase + DT2815_STATUS); in dt2815_ao_status()
67 return -EBUSY; in dt2815_ao_status()
74 struct dt2815_private *devpriv = dev->private; in dt2815_ao_insn_read()
76 int chan = CR_CHAN(insn->chanspec); in dt2815_ao_insn_read()
78 for (i = 0; i < insn->n; i++) in dt2815_ao_insn_read()
79 data[i] = devpriv->ao_readback[chan]; in dt2815_ao_insn_read()
87 struct dt2815_private *devpriv = dev->private; in dt2815_ao_insn()
89 int chan = CR_CHAN(insn->chanspec); in dt2815_ao_insn()
93 for (i = 0; i < insn->n; i++) { in dt2815_ao_insn()
102 outb(lo, dev->iobase + DT2815_DATA); in dt2815_ao_insn()
108 outb(hi, dev->iobase + DT2815_DATA); in dt2815_ao_insn()
110 devpriv->ao_readback[chan] = data[i]; in dt2815_ao_insn()
119 * 0 == unipolar 5V (0V -- +5V)
120 * 1 == bipolar 5V (-5V -- +5V)
121 * options[3] Current offset configuration
122 * 0 == disabled (0mA -- +32mAV)
123 * 1 == enabled (+4mA -- +20mAV)
125 * 0 == program 1 (see manual table 5-4)
126 * 1 == program 2 (see manual table 5-4)
127 * 2 == program 3 (see manual table 5-4)
128 * 3 == program 4 (see manual table 5-4)
129 * options[5] Analog output 0 range configuration
147 ret = comedi_request_region(dev, it->options[0], 0x2); in dt2815_attach()
157 return -ENOMEM; in dt2815_attach()
159 s = &dev->subdevices[0]; in dt2815_attach()
161 s->type = COMEDI_SUBD_AO; in dt2815_attach()
162 s->subdev_flags = SDF_WRITABLE; in dt2815_attach()
163 s->maxdata = 0xfff; in dt2815_attach()
164 s->n_chan = 8; in dt2815_attach()
165 s->insn_write = dt2815_ao_insn; in dt2815_attach()
166 s->insn_read = dt2815_ao_insn_read; in dt2815_attach()
167 s->range_table_list = devpriv->range_type_list; in dt2815_attach()
169 current_range_type = (it->options[3]) in dt2815_attach()
171 voltage_range_type = (it->options[2]) in dt2815_attach()
174 devpriv->range_type_list[i] = (it->options[5 + i]) in dt2815_attach()
179 outb(0x00, dev->iobase + DT2815_STATUS); in dt2815_attach()
185 status = inb(dev->iobase + DT2815_STATUS); in dt2815_attach()
189 program = (it->options[4] & 0x3) << 3 | 0x7; in dt2815_attach()
190 outb(program, dev->iobase + DT2815_DATA); in dt2815_attach()
191 dev_dbg(dev->class_dev, "program: 0x%x (@t=%d)\n", in dt2815_attach()
195 dev_dbg(dev->class_dev, in dt2815_attach()
199 outb(0x00, dev->iobase + DT2815_STATUS); in dt2815_attach()
215 MODULE_DESCRIPTION("Comedi low-level driver");