- From: David Schleef <ds_at_schleef.org>
- Date: Wed, 31 Jul 2002 13:47:50 -0700
On Wed, Jul 31, 2002 at 04:30:09AM -0700, Senthil Kumar SNR wrote:
> I am using DT2821 board and configured comedi-0.7.64
> and comedilib-0.7.18. All configured fine and when we
> try to execute the ./info it shows the 3 available
> subdivices. But when we try to execute the ao_waveform
> it gives the error as :
>
> comedi_comnand : Resource temporarily unavailable.
comedi_command() causing an EAGAIN error means that the command
is incompatible with the subdevice. It's a strange error number
because you're supposed to verify that commands are compatible
with a subdevice first. As I am just noticing, ao_waveform does
not do this correctly. Here's a patch.
dave...
Index: ao_waveform.c
===================================================================
RCS file: /var/cvs/comedilib/demo/ao_waveform.c,v
retrieving revision 1.13
diff -u -r1.13 ao_waveform.c
--- ao_waveform.c 7 Jun 2002 00:16:42 -0000 1.13
+++ ao_waveform.c 31 Jul 2002 20:46:54 -0000
_at__at_ -163,6 +163,18 _at__at_
dump_cmd(stdout,&cmd);
+ err = comedi_command_test(dev, &cmd);
+ if (err < 0) {
+ comedi_perror("comedi_command_test");
+ exit(1);
+ }
+
+ err = comedi_command_test(dev, &cmd);
+ if (err < 0) {
+ comedi_perror("comedi_command_test");
+ exit(1);
+ }
+
if ((err = comedi_command(dev, &cmd)) < 0) {
comedi_perror("comedi_command");
exit(1);
Received on 2002-07-31Z19:47:50