- From: Calin A. Culianu <calin_at_ajvar.org>
- Date: Fri, 7 Oct 2005 08:46:36 -0400 (EDT)
On Fri, 7 Oct 2005, edouard charvet wrote: > ni6527 can do this. You can choose which line should generate an interrupt > and which should not and on what kind of edge (rising and/or falling). > However, once an interrupt is caught, you have to manually scan all your > input lines to find which one had changed. > > In user space, you set this through a command call and then all you have to > do is to wait on the file descriptor linked to the device. Cool. Wasn't aware comedi_cmd could clearly express this type of situation. How do you configure the lines through the comedi API? Scanning all the lines isn't that bad.. it can be done as only one or a small number of i/o operations if you do things like comedi_dio_bitfield() (well, depends on the driver, but..) There are some el-cheapo boards out there that can do Change-of-State detection (COS, as I found out it's called). They all have released specs. I am tempted to buy one of these boards and write a driver for it.. although I am *still* super-fuzzy on how you can express configuring and doing COS detection useing the comedi api.. -Calin
Received on 2005-10-07Z11:46:36