Name

comedi_set_buffer_size — streaming buffer size of subdevice

Synopsis

#include <comedilib.h>
int comedi_set_buffer_size(comedi_t * device,
 unsigned int subdevice,
 unsigned int size);
 

Description

The function comedi_set_buffer_size changes the size of the streaming buffer for the subdevice specified by device and subdevice. The buffer size will be set to size bytes, rounded up to a multiple of the virtual memory page size. The virtual memory page size can be determined using sysconf(_SC_PAGE_SIZE).

This function does not require special privileges. However, it is limited to a (adjustable) maximum buffer size, which can be changed by a privileged user calling comedi_set_max_buffer_size, or running the program comedi_config.

Return value

On success, comedi_set_buffer_size returns the new buffer size in bytes. On failure, -1 is returned.