int channel;
unsigned long flags;
+ if (insn->n == 0)
+ return 0;
+
// set channel and range
channel = CR_CHAN(insn->chanspec);
comedi_spin_lock_irqsave(&dev->spinlock, flags);
int channel;
unsigned long flags;
+ if (insn->n == 0)
+ return 0;
+
// clear dac fifo
outw(0, devpriv->ao_registers + DACFIFOCLR);
static int cb_pcidas_ao_readback_insn(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data)
{
+ if (insn->n == 0)
+ return 0;
+
data[0] = devpriv->ao_value[CR_CHAN(insn->chanspec)];
return 1;
uint8_t nvram_data;
int retval;
+ if (insn->n == 0)
+ return 0;
+
retval = nvram_read(dev, CR_CHAN(insn->chanspec), &nvram_data);
if (retval < 0)
return retval;
{
const unsigned int channel = CR_CHAN(insn->chanspec);
+ if (insn->n == 0)
+ return 0;
+
return caldac_8800_write(dev, channel, data[0]);
}
static int caldac_read_insn(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data)
{
+ if (insn->n == 0)
+ return 0;
+
data[0] = devpriv->caldac_value[CR_CHAN(insn->chanspec)];
return 1;
static int dac08_write_insn(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data)
{
+ if (insn->n == 0)
+ return 0;
+
return dac08_write(dev, data[0]);
}
static int dac08_read_insn(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data)
{
+ if (insn->n == 0)
+ return 0;
+
data[0] = devpriv->dac08_value;
return 1;
{
unsigned int channel = CR_CHAN(insn->chanspec);
+ if (insn->n == 0)
+ return 0;
+
return cb_pcidas_trimpot_write(dev, channel, data[0]);
}
{
unsigned int channel = CR_CHAN(insn->chanspec);
+ if (insn->n == 0)
+ return 0;
+
data[0] = devpriv->trimpot_value[channel];
return 1;