1COMEDI_MARK_BUFFER_WRITTEN(3)                    COMEDI_MARK_BUFFER_WRITTEN(3)
2
3
4

NAME

6       comedi_mark_buffer_written - streaming buffer control
7

SYNOPSIS

9       #include <comedilib.h>
10
11       int  comedi_mark_buffer_written (comedi_t * device, unsigned int subde‐
12       vice, unsigned int num_bytes);
13

DESCRIPTION

15       The function comedi_mark_buffer_written() is used on a  subdevice  that
16       has a Comedi output command in progress.  It should only be used if you
17       are using a mmap() (as opposed to calling write() on the  device  file)
18       to  write data to Comedi's buffer, since Comedi will automatically keep
19       track of how many bytes have been transferred via write() calls.   This
20       function  is used to indicate that the next num_bytes bytes in the buf‐
21       fer are valid and may be sent to the device.  If there is an error,  -1
22       is returned.
23
24                                28 October 2007  COMEDI_MARK_BUFFER_WRITTEN(3)
Impressum