1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>comedi_internal_trigger</title><link rel="stylesheet" type="text/css" href="comedilib.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="Comedi"><link rel="up" href="functionreference.html#idm2224" title="5.4.1. Core Functions"><link rel="prev" href="func-ref-comedi-get-version-code.html" title="comedi_get_version_code"><link rel="next" href="func-ref-comedi-lock.html" title="comedi_lock"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">comedi_internal_trigger</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="func-ref-comedi-get-version-code.html">Prev</a> </td><th width="60%" align="center">5.4.1. Core Functions</th><td width="20%" align="right"> <a accesskey="n" href="func-ref-comedi-lock.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="func-ref-comedi-internal-trigger"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>comedi_internal_trigger — generate soft trigger</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include <comedilib.h></pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">comedi_internal_trigger</b>(</code></td><td>comedi_t * <var class="pdparam">device</var>, </td></tr><tr><td> </td><td>unsigned int <var class="pdparam">subdevice</var>, </td></tr><tr><td> </td><td>unsigned int <var class="pdparam">trig_num</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm3272"></a><h2>
Description
</h2><p>
This function sends an <code class="constant">INSN_INTTRIG</code> instruction to a subdevice, which causes an internal triggering event.
This event can, for example, trigger a subdevice to start an asynchronous command.
</p><p>
The <em class="parameter"><code>trig_num</code></em> 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 <em class="structfield"><code>start_src</code></em> of <code class="constant">TRIG_INT</code>,
and a <em class="structfield"><code>start_arg</code></em> of <code class="literal">5</code>.
Then the start event would only be triggered if <code class="function">comedi_internal_trigger</code>
were called on the subdevice with a <em class="parameter"><code>trig_num</code></em>
equal to the same value of <code class="literal">5</code>.
</p></div><div class="refsect1"><a name="idm3285"></a><h2>
Return value
</h2><p>
<code class="literal">0</code> on success, <code class="literal">-1</code> on error.
</p><p>
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="func-ref-comedi-get-version-code.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="functionreference.html#idm2224">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="func-ref-comedi-lock.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">comedi_get_version_code </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> comedi_lock</td></tr></table></div></body></html>
|