removed outdated lseek stuff
authorFrank Mori Hess <fmhess@speakeasy.net>
Mon, 14 May 2001 00:06:37 +0000 (00:06 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Mon, 14 May 2001 00:06:37 +0000 (00:06 +0000)
demo/ao_waveform.c

index 4edc518da2eda37dc864302ff3aae95698fb107d..d0ef7f865f1273d1d85aea58934832d25d33487a 100644 (file)
  * write(), you should fill the buffer using write() before
  * you call comedi_command(), as is done here.
  *
- * Also NOTE!  The lseek() to offset 1 is used to tell
- * comedi that you want to write to subdevice 1.  This
- * is not needed for analog input, since AI is usually on
- * subdevice 0.
  */
 
 #include <stdio.h>
@@ -136,7 +132,8 @@ int main(int argc, char *argv[])
        dds_output(data,BUF_LEN);
        dds_output(data,BUF_LEN);
 
-       lseek(comedi_fileno(dev),subdevice,SEEK_SET);
+       //lseek no longer needed or used
+       //lseek(comedi_fileno(dev),subdevice,SEEK_SET);
        m=write(comedi_fileno(dev),data,BUF_LEN*sizeof(sampl_t));
        perror("write");
        printf("m=%d\n",m);