Specifications
Comedi
40 / 148
5.4.1.7 comedi_do_insn
comedi_do_insn — perform instruction
Synopsis
#include <comedilib.h>
int comedi_do_insn(comedi_t * device, comedi_insn * instruction);
Description
The function comedi_do_insn() performs a single instruction.
Return value
If successful, returns a non-negative number. For the case of INSN_READ or INSN_WRITE instructions, comedi_do_insn()
returns the number of samples read or written, which may be less than the number requested. If there is an error, -1 is returned.
5.4.1.8 comedi_do_insnlist
comedi_do_insnlist — perform multiple instructions
Synopsis
#include <comedilib.h>
int comedi_do_insnlist(comedi_t * device, comedi_insnlist * list);
Description
The function comedi_do_insnlist() performs multiple Comedi instructions as part of one system call. This function can
be used to avoid the overhead of multiple system calls.
Return value
The function comedi_do_insnlist() returns the number of successfully completed instructions. Error information for the
unsuccessful instruction is not available. If there is an error before the first instruction can be executed, -1 is returned.
5.4.1.9 comedi_fileno
comedi_fileno — get file descriptor for open Comedilib device
Synopsis
#include <comedilib.h>
int comedi_fileno(comedi_t * device);