from the ports to match the inversion of values written.
readb(private(dev)->mite->daq_io_addr +
Port_Data(port));
// rt_printk("read 0x%x from port %i\n", port_read_bits, port);
+ if (s->type == COMEDI_SUBD_DO && board(dev)->invert_outputs) {
+ /* Outputs inverted, so invert value read back from
+ * DO subdevice. (Does not apply to boards with DIO
+ * subdevice.) */
+ port_read_bits ^= 0xFF;
+ }
if (bitshift > 0) {
port_read_bits <<= bitshift;
} else {