1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>comedi_get_hardcal_converter</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#idm4383" title="5.4.3. Calibration"><link rel="prev" href="func-ref-comedi-get-default-calibration-path.html" title="comedi_get_default_calibration_path"><link rel="next" href="func-ref-comedi-get-softcal-converter.html" title="comedi_get_softcal_converter"></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_get_hardcal_converter</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="func-ref-comedi-get-default-calibration-path.html">Prev</a> </td><th width="60%" align="center">5.4.3. Calibration</th><td width="20%" align="right"> <a accesskey="n" href="func-ref-comedi-get-softcal-converter.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="func-ref-comedi-get-hardcal-converter"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>comedi_get_hardcal_converter — get converter for hardware-calibrated subdevice</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_get_hardcal_converter</b>(</code></td><td>comedi_t * <var class="pdparam">device</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">subdevice</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">channel</var>, </td></tr><tr><td> </td><td>unsigned <var class="pdparam">range</var>, </td></tr><tr><td> </td><td>enum comedi_conversion_direction <var class="pdparam">direction</var>, </td></tr><tr><td> </td><td>comedi_polynomial_t * <var class="pdparam">converter</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm4605"></a><h2>
Status
</h2><p>
alpha
</p></div><div class="refsect1"><a name="idm4608"></a><h2>
Description
</h2><p>
The function <code class="function">comedi_get_hardcal_converter</code> initializes
the <span class="type">comedi_polynomial_t</span> pointed to by
<em class="parameter"><code>converter</code></em> so it can be
passed to either
<code class="function"><a class="link" href="func-ref-comedi-to-physical.html" title="comedi_to_physical">comedi_to_physical</a></code>,
or <code class="function"><a class="link" href="func-ref-comedi-from-physical.html" title="comedi_from_physical">comedi_from_physical</a></code>.
The result can be used to
convert data from the specified <em class="parameter"><code>subdevice</code></em>,
<em class="parameter"><code>channel</code></em>, and <em class="parameter"><code>range</code></em>. The <em class="parameter"><code>direction</code></em>
parameter specifies whether <em class="parameter"><code>converter</code></em>
will be passed to <code class="function">comedi_to_physical</code>
or <code class="function">comedi_from_physical</code>.
</p><p>
This function initializes the <span class="type">comedi_polynomial_t</span> pointed to by
<em class="parameter"><code>converter</code></em> as a simple linear function with no
calibration information, appropriate
for boards which do their gain/offset/nonlinearity corrections in hardware. If your board
needs calibration to be performed in software by the host computer,
use <code class="function">comedi_get_softcal_converter</code>
instead. A subdevice will advertise the fact that it depends on a software calibration
with the <code class="constant">SDF_SOFT_CALIBRATED</code> subdevice flag.
</p><p>
The result of this function will only depend on the
<em class="parameter"><code>channel</code></em>
parameter if either
<code class="function"><a class="link" href="func-ref-comedi-range-is-chan-specific.html" title="comedi_range_is_chan_specific">comedi_range_is_chan_specific</a></code>
or <code class="function"><a class="link" href="func-ref-comedi-maxdata-is-chan-specific.html" title="comedi_maxdata_is_chan_specific">comedi_maxdata_is_chan_specific</a></code>
returns true for the specified <em class="parameter"><code>subdevice</code></em>.
</p></div><div class="refsect1"><a name="idm4637"></a><h2>
Return value
</h2><p>
Returns <code class="literal">0</code> on success, <code class="literal">-1</code> on failure.
</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-default-calibration-path.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="functionreference.html#idm4383">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="func-ref-comedi-get-softcal-converter.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">comedi_get_default_calibration_path </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> comedi_get_softcal_converter</td></tr></table></div></body></html>
|