file location. The calibration information used by this function
is generated by the comedi_calibrate program (see its man page).
- The functions comedi_parse_calibration_file(),
- comedi_apply_parsed_calibration(), and comedi_cleanup_calibration()
+ The functions
+ <link linkend="func-ref-comedi-parse-calibration-file"><function>comedi_parse_calibration_file</function></link>,
+ <link linkend="func-ref-comedi-apply-parsed-calibration"><function>comedi_apply_parsed_calibration</function></link>,
+ and <link linkend="func-ref-comedi-cleanup-calibration"><function>comedi_cleanup_calibration_file</function></link>
provide the same functionality at a slightly lower level.
Returns:
Zero on success, a negative number on failure.
Param: const comedi_calibration_t *calibration
Status: alpha
Description:
- This function is similar to comedi_apply_calibration()
+ This function is similar to
+ <link linkend="func-ref-comedi-apply-calibration"><function>comedi_apply_calibration</function></link>,
except the calibration information is read from memory
instead of a file. This function can be more
efficient than comedi_apply_calibration() since the
calibration file does not need to be reparsed with
every call. The <parameter>calibration</parameter> is
- obtained by a call to comedi_parse_calibration_file().
+ obtained by a call to
+ <link linkend="func-ref-comedi-parse-calibration-file"><function>comedi_parse_calibration_file</function></link>.
Returns:
Zero on success, a negative number on failure.
Description:
This function frees the resources associated with a
comedi_calibration_t obtained from
- comedi_parse_calibration_file(). <parameter>calibration</parameter>
+ <link linkend="func-ref-comedi-parse-calibration-file"><function>comedi_parse_calibration_file</function></link>.
+ *<parameter>calibration</parameter>
can not be used again after calling this function.
Function: comedi_get_default_calibration_path -- get default calibration file path
the string is no longer needed.
Returns:
A string which contains a file path useable by
- comedi_parse_calibration_file(). On error, NULL is returned.
+ <link linkend="func-ref-comedi-parse-calibration-file"><function>comedi_parse_calibration_file</function></link>.
+ On error, NULL is returned.
Function: comedi_get_hardcal_converter -- get converter for hardware-calibrated subdevice
Retval: int
Param: comedi_polynomial_t *converter
Status: alpha
Description:
- comedi_get_hardcal_converter() initializes <parameter>converter</parameter> so it can be
- passed to either comedi_to_physical() or comedi_from_physical(). The result can be used to
+ comedi_get_hardcal_converter() initializes *<parameter>converter</parameter> so it can be
+ passed to either
+ <link linkend="func-ref-comedi-to-physical"><function>comedi_to_physical</function></link>,
+ or <link linkend="func-ref-comedi-from-physical"><function>comedi_from_physical</function></link>.
+ The result can be used to
convert data from the specified <parameter>subdevice</parameter>,
<parameter>channel</parameter>, and <parameter>range</parameter>. The <parameter>direction</parameter>
parameter specifies whether <parameter>converter</parameter> will be passed to comedi_to_physical()
or comedi_from_physical().
- This function initializes <parameter>converter</parameter> as a simple linear function with no
+ This function initializes *<parameter>converter</parameter> 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 comedi_get_softcal_converter()
with the SDF_SOFT_CALIBRATED subdevice flag.
The result of this function will only depend on the <parameter>channel</parameter>
- parameter if either comedi_range_is_chan_specific() or comedi_maxdata_is_chan_specific()
- is true for the specified <parameter>subdevice</parameter>.
+ parameter if either
+ <link linkend="func-ref-comedi-range-is-chan-specific"><function>comedi_range_is_chan_specific</function></link>
+ or <link linkend="func-ref-comedi-maxdata-is-chan-specific"><function>comedi_maxdata_is_chan_specific</function></link>
+ returns true for the specified <parameter>subdevice</parameter>.
Returns:
Zero on success or -1 on failure.
Param: comedi_polynomial_t *converter
Status: alpha
Description:
- comedi_get_softcal_converter() initializes <parameter>converter</parameter> so it can be
- passed to either comedi_to_physical() or comedi_from_physical(). The <parameter>converter</parameter>
- parameter can then be used to
+ comedi_get_softcal_converter() initializes *<parameter>converter</parameter> so it can be
+ passed to either
+ <link linkend="func-ref-comedi-to-physical"><function>comedi_to_physical</function></link>
+ or <link linkend="func-ref-comedi-from-physical"><function>comedi_from_physical</function></link>.
+ The *<parameter>converter</parameter>
+ struct can then be used to
convert data from the specified <parameter>subdevice</parameter>,
<parameter>channel</parameter>, and <parameter>range</parameter>. The <parameter>direction</parameter>
- parameter specifies whether <parameter>converter</parameter> will be passed to comedi_to_physical()
+ parameter specifies whether *<parameter>converter</parameter> will be passed to comedi_to_physical()
or comedi_from_physical(). The <parameter>parsed_calibration</parameter> parameter contains the
- software calibration values for your device, and may be obtained by calling comedi_parse_calibration_file()
+ software calibration values for your device, and may be obtained by calling
+ <link linkend="func-ref-comedi-parse-calibration-file"><function>comedi_parse_calibration_file</function></link>
on a calibration file generated by the comedi_soft_calibrate program.
This function is only useful for boards that perform their calibrations in software on the host
This function parses a calibration file (produced by the
comedi_calibrate or comedi_soft_calibrate programs) and returns a pointer
to a comedi_calibration_t which can be passed to the
- comedi_apply_parsed_calibration() or comedi_get_softcal_converter()
+ <link linkend="func-ref-comedi-apply-parsed-calibration"><function>comedi_apply_parsed_calibration</function></link>
+ or <link linkend="func-ref-comedi-get-softcal-converter"><function>comedi_get_softcal_converter</function></link>
functions. When you are
finished using the comedi_calibration_t, you should
- call comedi_cleanup_calibration() to free the resources
+ call <link linkend="func-ref-comedi-cleanup-calibration"><function>comedi_cleanup_calibration</function></link>
+ to free the resources
associated with the comedi_calibration_t.
- The comedi_get_default_calibration_path() function may
- be useful in conjunction with this function.
+ The <link linkend="func-ref-comedi-get-default-calibration-path"><function>comedi_get_default_calibration_path</function></link>
+ function may be useful in conjunction with this function.
Returns:
A pointer to parsed calibration information on success, or NULL on failure.