diff --git a/demo/cmd.c b/demo/cmd.c index 82c3f36..95f29a2 100644 --- a/demo/cmd.c +++ b/demo/cmd.c @@ -54,7 +54,8 @@ int main(int argc, char *argv[]) int total=0; int i; struct timeval start,end; - + int subdev_flags; + parse_options(argc,argv); /* The following global variables used in this demo are @@ -136,7 +137,7 @@ int main(int argc, char *argv[]) comedi_perror("comedi_command"); exit(1); } - + subdev_flags = comedi_get_subdevice_flags(dev, subdevice); while(1){ ret=read(comedi_fileno(dev),buf,BUFSZ); if(ret<0){ @@ -148,10 +149,18 @@ int main(int argc, char *argv[]) break; }else{ static int col = 0; + int bytes_per_sample; total+=ret; if(verbose)fprintf(stderr,"read %d %d\n",ret,total); - for(i=0;i