Specifications

Comedi
56 / 148
Return value
The new buffer size in bytes is returned on success. On error, -1 is returned.
5.4.2.16 comedi_set_max_buffer_size
comedi_set_max_buffer_size — streaming maximum buffer size of subdevice
Synopsis
#include <comedilib.h>
int comedi_set_max_buffer_size(comedi_t * device, unsigned int subdevice, unsigned int max_size);
Description
The function comedi_set_max_buffer_size() changes the maximum allowable size (in bytes) of the streaming buffer
for the subdevice specified by device and subdevice. Changing the maximum buffer size requires the user to have appropriate
privileges.
Return value
The new maximum buffer size is returned on success. On error, -1 is returned.
5.4.3 Calibration
5.4.3.1 comedi_apply_calibration
comedi_apply_calibration — set hardware calibration from file
Synopsis
#include <comedilib.h>
int comedi_apply_calibration(comedi_t * device, unsigned int subdevice, unsigned int channel, unsigned int range, unsigned
int aref, const char * file_path);
Status
alpha
Description
The function comedi_apply_calibration() sets the hardware calibration for the subdevice specified by device and s-
ubdevice so that it is in proper calibration when using the channel specified by channel, range index specified by range
and analog reference specified by aref. It does so by performing writes to the appropriate channels of the board’s calibration
subdevice(s). Depending on the hardware, the calibration settings used may or may not depend on the channel, range, or analog
reference. Furthermore, the calibrations appropriate for different channel, range, and analog reference parameters may not be able
to be applied simultaneously. For example, some boards cannot have their analog inputs calibrated for more than one input range
simultaneously. Applying a calibration for range 1 may blow away a previously applied calibration for range 0. Or, applying
a calibration for analog input channel 0 may cause the same calibration to be applied to all the other analog input channels as
well. Your only guarantee is that calls to comedi_apply_calibration() on different subdevices will not interfere with
each other.