- From: Jim Benson <jbenson_at_sextans.lowell.edu>
- Date: Tue, 12 Nov 2002 15:32:26 -0700 (MST)
On Tue, 12 Nov 2002, David Schleef wrote: > On Tue, Nov 12, 2002 at 02:31:40PM -0700, Jim Benson wrote: > > > If i read say the first 500 bytes and then mark that > > read as read with comedi_mark_buffer_read... > > Don't do this. Just read() the samples as if it were a file > or network socket. See the demo/cmd.c example. > Thanks...i did look at that example first...before i switched to the mmap example. I'm guessing that using a memory map will ultimately give a faster "read" than using something like: read(comedi_fileno(dev), buf, BUFSZ); Then i started trying to figure out what happens when the streaming buffer fills up... or even what happens when i read n bytes of N (n < N) available. Then, once it fills up, what action do i do that effectively tells comedi that it can start filling the streaming buffer at some start offset. I'm probably making this more complicated than it is. Thanks, Jim
Received on 2002-11-12Z22:32:26