[prev in list] [next in list] [prev in thread] [next in thread]
List: comedi
Subject: [PATCH][RFC] Implement INSN_CONFIG_DIO_QUERY for PFI pins [WAS:
From: Jan Gukelberger <g.u.g.i () gmx ! de>
Date: 2005-09-29 17:03:13
Message-ID: 1128013393.4158.50.camel () elessar ! home
[Download RAW message or body]
Hi,
if the PFI pins on the NI 6025 board can be used for generic DIO it
makes sense to implement INSN_CONFIG_DIO_QUERY for those, too.
So I've tried and done the obvious. See attached patch.
Unfortunately, I don't have a very deep understanding of the driver and
ATM even haven't got a piece of hardware to test at hand. Moreover, a
quick glance at the E Series RLP Manual didn't show any examples where
the PFI pins are used for generic DIO.
So could anyone with a better understanding have a quick look and tell
me if these lines are correct or complete bullshit?
Thanks,
Jan
On Thu, 2005-09-15 at 16:02 -0500, Caleb Tennis wrote:
> On Thursday 15 September 2005 03:16 pm, Jan Gukelberger wrote:
> > Can anybody tell me what this subdev is intended for?
>
> It corresponds to the PFI pins on the 6025 board:
>
> PFI0/TRIG1
> PFI1/TRIG2
> ...
> PFI9/GPCTR0_GATE
>
> I believe you can use them for either generic digital IO or as the trigger,
> gate, and source pins for the counter/timers.
>
> Caleb
["ni_mio_common.c.diff" (ni_mio_common.c.diff)]
--- ni_mio_common.c.orig 2005-09-29 18:13:41.298150256 +0200
+++ ni_mio_common.c 2005-09-29 18:33:34.870699648 +0200
@@ -3700,6 +3700,10 @@
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;
}
_______________________________________________
comedi mailing list
comedi@comedi.org
https://cvs.comedi.org/cgi-bin/mailman/listinfo/comedi
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic