unsigned int dac, digitalio;
printk("comedi%d: cb_pcidda: ",dev->minor);
-
+
/*
* Allocate the private structure area.
*/
/*
* Allocate the subdevice structures.
*/
- dev->n_subdevices=1;
+ dev->n_subdevices=3;
if(alloc_subdevices(dev)<0)
return -ENOMEM;
s->insn_write = &cb_pcidda_ao_winsn;
// s->do_cmd = &cb_pcidda_ai_cmd;
s->do_cmdtest = &cb_pcidda_ai_cmdtest;
-
+
+ // two 8255 digital io subdevices
+ s = dev->subdevices + 1;
+ subdev_8255_init(dev, s, NULL, (void *)(devpriv->digitalio));
+ s = dev->subdevices + 2;
+ subdev_8255_init(dev, s, NULL,
+ (void *)(devpriv->digitalio + PORT2A));
+
return 1;
}
if(devpriv->dac)
release_region(devpriv->dac, 8 + thisboard->ao_chans*2);
}
+ // cleanup 8255
+ if(dev->subdevices)
+ {
+ subdev_8255_cleanup(dev, dev->subdevices + 1);
+ subdev_8255_cleanup(dev, dev->subdevices + 2);
+ }
+
printk("comedi%d: cb_pcidda: remove\n",dev->minor);
return 0;