unsigned int ai_pg;
void *ao;
unsigned int ao_nbits;
- void *di;
void *do_;
unsigned int i8255_offset;
return n;
}
-static int das16_di_rbits(struct comedi_device *dev, struct comedi_subdevice *s,
- struct comedi_insn *insn, unsigned int *data)
+static int das16_di_insn_bits(struct comedi_device *dev,
+ struct comedi_subdevice *s,
+ struct comedi_insn *insn,
+ unsigned int *data)
{
- unsigned int bits;
-
- bits = inb(dev->iobase + DAS16_DIO) & 0xf;
- data[1] = bits;
- data[0] = 0;
+ data[1] = inb(dev->iobase + DAS16_DIO) & 0xf;
return insn->n;
}
s->type = COMEDI_SUBD_UNUSED;
}
+ /* Digital Input subdevice */
s = &dev->subdevices[2];
- /* di */
- if (board->di) {
- s->type = COMEDI_SUBD_DI;
- s->subdev_flags = SDF_READABLE;
- s->n_chan = 4;
- s->maxdata = 1;
- s->range_table = &range_digital;
- s->insn_bits = board->di;
- } else {
- s->type = COMEDI_SUBD_UNUSED;
- }
+ s->type = COMEDI_SUBD_DI;
+ s->subdev_flags = SDF_READABLE;
+ s->n_chan = 4;
+ s->maxdata = 1;
+ s->range_table = &range_digital;
+ s->insn_bits = das16_di_insn_bits;
s = &dev->subdevices[3];
/* do */
.ai_pg = das16_pg_none,
.ao = das16_ao_winsn,
.ao_nbits = 12,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0x10,
.i8254_offset = 0x0c,
.ai_pg = das16_pg_none,
.ao = das16_ao_winsn,
.ao_nbits = 12,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0x10,
.i8254_offset = 0x0c,
.ai_pg = das16_pg_none,
.ao = das16_ao_winsn,
.ao_nbits = 12,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0x10,
.i8254_offset = 0x0c,
.ai_pg = das16_pg_none,
.ao = das16_ao_winsn,
.ao_nbits = 12,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0x10,
.i8254_offset = 0x0c,
.ai_pg = das16_pg_none,
.ao = das16_ao_winsn,
.ao_nbits = 12,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0x10,
.i8254_offset = 0x0c,
.ai_speed = 7692,
.ai_pg = das16_pg_16jr,
.ao = NULL,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0,
.i8254_offset = 0x0c,
.ai_speed = 3300,
.ai_pg = das16_pg_16jr,
.ao = NULL,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0,
.i8254_offset = 0x0c,
.ai_speed = 10000,
.ai_pg = das16_pg_16jr_16,
.ao = NULL,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0,
.i8254_offset = 0x0c,
.ai_speed = 10000,
.ai_pg = das16_pg_16jr_16,
.ao = NULL,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0,
.i8254_offset = 0x0c,
.ai_speed = 20000,
.ai_pg = das16_pg_none,
.ao = NULL,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0x400,
.i8254_offset = 0x0c,
.ai_speed = 10000,
.ai_pg = das16_pg_none,
.ao = NULL,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0x400,
.i8254_offset = 0x0c,
.ai_speed = 10000,
.ai_pg = das16_pg_1601,
.ao = NULL,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0x0,
.i8254_offset = 0x0c,
.ai_speed = 10000,
.ai_pg = das16_pg_1602,
.ao = NULL,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0x0,
.i8254_offset = 0x0c,
.ai_pg = das16_pg_1601,
.ao = das16_ao_winsn,
.ao_nbits = 12,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0x400,
.i8254_offset = 0x0c,
.ai_pg = das16_pg_1602,
.ao = das16_ao_winsn,
.ao_nbits = 12,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0x400,
.i8254_offset = 0x0c,
.ai_speed = 6250,
.ai_pg = das16_pg_1601,
.ao = NULL,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0,
.i8254_offset = 0x0c,
.ai_speed = 6250,
.ai_pg = das16_pg_1602,
.ao = NULL,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0,
.i8254_offset = 0x0c,
.ai_speed = 10000,
.ai_pg = das16_pg_1602,
.ao = NULL,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0,
.i8254_offset = 0x0c,
.ai_pg = das16_pg_1601,
.ao = das16_ao_winsn,
.ao_nbits = 12,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0x400,
.i8254_offset = 0x0c,
.ai_pg = das16_pg_1602,
.ao = das16_ao_winsn,
.ao_nbits = 12,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0x400,
.i8254_offset = 0x0c,
.ai_pg = das16_pg_1602,
.ao = das16_ao_winsn,
.ao_nbits = 12,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0x400,
.i8254_offset = 0x0c,
.ai_speed = 3030,
.ai_pg = das16_pg_16jr,
.ao = NULL,
- .di = das16_di_rbits,
.do_ = das16_do_wbits,
.i8255_offset = 0,
.i8254_offset = 0x0c,