comedi_internal_trigger — generate soft trigger


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


This function sends an INSN_INTTRIG instruction to a subdevice, which causes an internal triggering event. This event can, for example, trigger a subdevice to start an asynchronous command.

The trig_num parameter is reserved for future use, and should be set to 0. It is likely it will be used in the future to support multiple independent internal triggers. For example, an asynchronous command might be specified for a subdevice with a start_src of TRIG_INT, and a start_arg of 5. Then the start event would only be triggered if comedi_internal_trigger were called on the subdevice with a trig_num equal to the same value of 5.

Return value

0 on success, -1 on error.