patch from Jan Gukelberger <g.u.g.i@gmx.de>:
authorFrank Mori Hess <fmhess@speakeasy.net>
Sat, 1 Oct 2005 18:12:51 +0000 (18:12 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sat, 1 Oct 2005 18:12:51 +0000 (18:12 +0000)
implemented INSN_CONFIG_DIO_QUERY for pfi subdevice.

comedi/drivers/ni_mio_common.c

index 648c8878363049f000555e0fb365663ec21cfb27..06e505b9811fafe460d2f62fa69d638e0231f094 100644 (file)
@@ -3708,6 +3708,10 @@ static int ni_pfi_insn_config(comedi_device *dev,comedi_subdevice *s,
        case COMEDI_INPUT:
                ni_set_bits(dev, IO_Bidirection_Pin_Register, 1<<chan, 0);
                break;
+       case INSN_CONFIG_DIO_QUERY:
+               data[1] = (devpriv->io_bidirection_pin_reg & (1<<chan)) ? COMEDI_OUTPUT : COMEDI_INPUT;
+               return insn->n;
+               break;
        default:
                return -EINVAL;
        }