Re: extra board specific functions

On 24/08/07 11:14, Gergely Imreh wrote:
> Also even if I set s->async->inttrig, inside the driver I can call it,
> and the trigger works, but the program itself cannot call it
> somehow... The trigger used to work, and I'm not sure what did I
> change to stop it from working....
> 
> I use this function to trigger in my program
> 
> int trigchn(comedi_t *it, int subdev)
> {
>   comedi_insn insn;
> 
>   insn.insn = INSN_INTTRIG;
>   insn.n = 1;
>   insn.data = 0;
>   insn.subdev = subdev;
>   insn.chanspec = 0;
>   return comedi_do_insn(it,&insn);
> }

I never spotted that before, but it's wrong.  Check comedilib's demo
programs for the correct way to set up the INSN_INTTRIG instruction.

int trigchn(comedi_t *it, int subdev)
{
  comedi_insn insn;
  lsampl_t data[1];

  memset(&insn, 0, sizeof(insn));
  data[0] = 0;
  insn.insn = INSN_INTTRIG;
  insn.n = 1;
  insn.data = data;
  insn.subdev = subdev;
  return comedi_do_insn(it,&insn);
}

-- 
-=( Ian Abbott _at_ MEV Ltd.    E-mail: <abbotti_at_mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-

Received on 2007-09-10Z09:44:32