const struct comedi_lrange *ranges;
enum trimpot_model trimpot;
unsigned has_dac08:1;
- unsigned has_ai_trig_gated:1; /* Tells if the AI trigger can be gated */
- unsigned has_ai_trig_invert:1; /* Tells if the AI trigger can be inverted */
+ unsigned is_1602:1;
};
static const struct cb_pcidas_board cb_pcidas_boards[] = {
.ranges = &cb_pcidas_ranges,
.trimpot = AD8402,
.has_dac08 = 1,
- .has_ai_trig_gated = 1,
- .has_ai_trig_invert = 1,
+ .is_1602 = 1,
},
{
.name = "pci-das1200",
.ranges = &cb_pcidas_ranges,
.trimpot = AD7376,
.has_dac08 = 0,
- .has_ai_trig_gated = 0,
- .has_ai_trig_invert = 0,
+ .is_1602 = 0,
},
{
.name = "pci-das1602/12",
.ranges = &cb_pcidas_ranges,
.trimpot = AD7376,
.has_dac08 = 0,
- .has_ai_trig_gated = 1,
- .has_ai_trig_invert = 1,
+ .is_1602 = 1,
},
{
.name = "pci-das1200/jr",
.ranges = &cb_pcidas_ranges,
.trimpot = AD7376,
.has_dac08 = 0,
- .has_ai_trig_gated = 0,
- .has_ai_trig_invert = 0,
+ .is_1602 = 0,
},
{
.name = "pci-das1602/16/jr",
.ranges = &cb_pcidas_ranges,
.trimpot = AD8402,
.has_dac08 = 1,
- .has_ai_trig_gated = 1,
- .has_ai_trig_invert = 1,
+ .is_1602 = 1,
},
{
.name = "pci-das1000",
.ranges = &cb_pcidas_ranges,
.trimpot = AD7376,
.has_dac08 = 0,
- .has_ai_trig_gated = 0,
- .has_ai_trig_invert = 0,
+ .is_1602 = 0,
},
{
.name = "pci-das1001",
.ranges = &cb_pcidas_alt_ranges,
.trimpot = AD7376,
.has_dac08 = 0,
- .has_ai_trig_gated = 0,
- .has_ai_trig_invert = 0,
+ .is_1602 = 0,
},
{
.name = "pci-das1002",
.ranges = &cb_pcidas_ranges,
.trimpot = AD7376,
.has_dac08 = 0,
- .has_ai_trig_gated = 0,
- .has_ai_trig_invert = 0,
+ .is_1602 = 0,
},
};
~(CR_FLAGS_MASK & ~(CR_EDGE | CR_INVERT));
err++;
}
- if (!thisboard->has_ai_trig_invert &&
- (cmd->start_arg & CR_INVERT)) {
+ if (!thisboard->is_1602 && (cmd->start_arg & CR_INVERT)) {
cmd->start_arg &= (CR_FLAGS_MASK & ~CR_INVERT);
err++;
}
bits |= SW_TRIGGER;
else if (cmd->start_src == TRIG_EXT) {
bits |= EXT_TRIGGER | TGEN | XTRCL;
- if (thisboard->has_ai_trig_invert
- && (cmd->start_arg & CR_INVERT))
- bits |= TGPOL;
- if (thisboard->has_ai_trig_gated && (cmd->start_arg & CR_EDGE))
- bits |= TGSEL;
+ if (thisboard->is_1602) {
+ if (cmd->start_arg & CR_INVERT)
+ bits |= TGPOL;
+ if (cmd->start_arg & CR_EDGE)
+ bits |= TGSEL;
+ }
} else {
comedi_error(dev, "bug!");
return -1;