From eec77d0aabfbadb6feee3bdff1aceb990b990393 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 20 Dec 2002 23:29:41 +0000 Subject: [PATCH] Patch from tomasz for INSN_INITTRIG --- comedi/kcomedilib/kcomedilib_main.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/comedi/kcomedilib/kcomedilib_main.c b/comedi/kcomedilib/kcomedilib_main.c index f07e1ba3..586199ba 100644 --- a/comedi/kcomedilib/kcomedilib_main.c +++ b/comedi/kcomedilib/kcomedilib_main.c @@ -214,6 +214,30 @@ int comedi_do_insn(comedi_t *d,comedi_insn *insn) udelay(insn->data[0]); ret=1; break; + case INSN_INTTRIG: + if(insn->n!=1){ + ret=-EINVAL; + break; + } + if(insn->subdev>=dev->n_subdevices){ + rt_printk("%d not usable subdevice\n",insn->subdev); + ret=-EINVAL; + break; + } + s=dev->subdevices+insn->subdev; + if(!s->async){ + rt_printk("no async\n"); + ret=-EINVAL; + break; + } + if(!s->async->inttrig){ + rt_printk("no inttrig\n"); + ret=-EAGAIN; + break; + } + ret = s->async->inttrig(dev,s,insn->data[0]); + if(ret>=0)ret = 1; + break; default: ret = -EINVAL; } -- 2.26.2