unsigned long flags;
int lsb, msb;
+ if (insn->n == 0)
+ return 0;
+
channel = CR_CHAN(insn->chanspec);
// turn off pacing of analog output channel
static int labpc_ao_rinsn(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;
static int labpc_calib_read_insn(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data)
{
+ if (insn->n == 0)
+ return 0;
+
data[0] = devpriv->caldac[CR_CHAN(insn->chanspec)];
return 1;
{
int channel = CR_CHAN(insn->chanspec);
+ if (insn->n == 0)
+ return 0;
+
write_caldac(dev, channel, data[0]);
return 1;
}
static int labpc_eeprom_read_insn(comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, lsampl_t * data)
{
+ if (insn->n == 0)
+ return 0;
+
data[0] = devpriv->eeprom_data[CR_CHAN(insn->chanspec)];
return 1;
return -EINVAL;
}
+ if (insn->n == 0)
+ return 0;
+
ret = labpc_eeprom_write(dev, channel, data[0]);
if (ret < 0)
return ret;