Lines Matching +full:straight +full:- +full:forward

1 // SPDX-License-Identifier: GPL-2.0+
4 * generic comedi driver for SSV Embedded Systems' DIL/Net-PCs
7 * COMEDI - Linux Control and Measurement Device Interface
13 * Description: SSV Embedded Systems DIL/Net-PC
15 * Devices: [SSV Embedded Systems] DIL/Net-PC 1486 (dnp-1486)
19 /* include files ----------------------------------------------------------- */
24 /* Some global definitions: the registers of the DNP ----------------------- */
27 /* pins, where Bit-N = 0 -> input, Bit-N = 1 -> output. Note that bits */
50 * Ports A and B are straight forward: each bit corresponds to an in dnp_dio_insn_bits()
58 outb(s->state & 0xff, CSCDR); in dnp_dio_insn_bits()
61 outb((s->state >> 8) & 0xff, CSCDR); in dnp_dio_insn_bits()
65 outb(((s->state >> 12) & 0xf0) | val, CSCDR); in dnp_dio_insn_bits()
77 return insn->n; in dnp_dio_insn_bits()
85 unsigned int chan = CR_CHAN(insn->chanspec); in dnp_dio_insn_config()
98 mask = 1 << (chan - 8); in dnp_dio_insn_config()
110 mask = 1 << ((chan - 16) * 2); in dnp_dio_insn_config()
121 return insn->n; in dnp_dio_insn_config()
130 * We use I/O ports 0x22, 0x23 and 0xa3-0xa9, which are always in dnp_attach()
139 s = &dev->subdevices[0]; in dnp_attach()
141 s->type = COMEDI_SUBD_DIO; in dnp_attach()
142 s->subdev_flags = SDF_READABLE | SDF_WRITABLE; in dnp_attach()
143 s->n_chan = 20; in dnp_attach()
144 s->maxdata = 1; in dnp_attach()
145 s->range_table = &range_digital; in dnp_attach()
146 s->insn_bits = dnp_dio_insn_bits; in dnp_attach()
147 s->insn_config = dnp_dio_insn_config; in dnp_attach()
171 .driver_name = "dnp-1486",
179 MODULE_DESCRIPTION("Comedi low-level driver");