- From: Edwin du <duq97_at_mails.tsinghua.edu.cn>
- Date: Tue, 24 Dec 2002 14:49:17 +0800
Dear all,
Merry Christmas!
I wrote a driver to catch di interrupt following structure as
comedi_parport.c. interrupt handling is the same.
In the cmd routine, I wrote cmd parameters like this:
cmd->start_src = TRIG_NOW;
cmd->start_arg = 0;
cmd->scan_begin_src = TRIG_EXT;
cmd->scan_begin_arg = 0;
cmd->convert_src = TRIG_FOLLOW;
cmd->convert_arg = 0;
cmd->scan_end_src = TRIG_COUNT;
cmd->scan_end_arg = n_chan; /* number of channels */
cmd->stop_src = TRIG_NONE;
cmd->stop_arg = 0;
cmd->chanlist = chanlist;
cmd->chanlist_len = n_chan;
cmd->data = capdata;
cmd->data_len = 30*sizeof(sampl_t);
the problem is when I was trying to read from dev file, the
ret = read(comedi_fileno(dev),buf,BUFZ);
does not return, while my interrupt does come.
am I right to set cmd in this way?
Received on 2002-12-24Z06:49:17