1COMEDI_GET_HARDCAL_C(3) Comedi reference COMEDI_GET_HARDCAL_C(3)
2
3
4
6 comedi_get_hardcal_converter - get converter for hardware-calibrated
7 subdevice
8
10 #include <comedilib.h>
11
12 int comedi_get_hardcal_converter(comedi_t * device, unsigned subdevice,
13 unsigned channel, unsigned range,
14 enum comedi_conversion_direction direction,
15 comedi_polynomial_t * converter);
16
18 alpha
19
21 The function comedi_get_hardcal_converter initializes the
22 comedi_polynomial_t pointed to by converter so it can be passed to
23 either comedi_to_physical, or comedi_from_physical. The result can be
24 used to convert data from the specified subdevice, channel, and range.
25 The direction parameter specifies whether converter will be passed to
26 comedi_to_physical or comedi_from_physical.
27
28 This function initializes the comedi_polynomial_t pointed to by
29 converter as a simple linear function with no calibration information,
30 appropriate for boards which do their gain/offset/nonlinearity
31 corrections in hardware. If your board needs calibration to be
32 performed in software by the host computer, use
33 comedi_get_softcal_converter instead. A subdevice will advertise the
34 fact that it depends on a software calibration with the
35 SDF_SOFT_CALIBRATED subdevice flag.
36
37 The result of this function will only depend on the channel parameter
38 if either comedi_range_is_chan_specific or
39 comedi_maxdata_is_chan_specific returns true for the specified
40 subdevice.
41
43 Returns 0 on success, -1 on failure.
44
46 David Schleef <ds@schleef.org>
47 Author.
48
49 Frank Mori Hess <fmhess@users.sourceforge.net>
50 Author.
51
52 Herman Bruyninckx <Herman.Bruyninckx@mech.kuleuven.ac.be>
53 Author.
54
55 Bernd Porr <tech@linux-usb-daq.co.uk>
56 Author.
57
58 Ian Abbott <abbotti@mev.co.uk>
59 Author.
60
61 Éric Piel <piel@delmic.com>
62 Author.
63
65 Copyright © 1998-2003 David Schleef
66 Copyright © 2001-2003, 2005, 2008 Frank Mori Hess
67 Copyright © 2002-2003 Herman Bruyninckx
68 Copyright © 2012 Bernd Porr
69 Copyright © 2012 Ian Abbott
70 Copyright © 2012, 2015 Éric Piel
71
72 This document is part of Comedilib. In the context of this document,
73 the term "source code" as defined by the license is interpreted as the
74 XML source.
75
76 This library is free software; you can redistribute it and/or modify it
77 under the terms of the GNU Lesser General Public License as published
78 by the Free Software Foundation, version 2.1 of the License.
79
80 This library is distributed in the hope that it will be useful, but
81 WITHOUT ANY WARRANTY; without even the implied warranty of
82 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
83 General Public License for more details.
84
85 You should have received a copy of the GNU Lesser General Public
86 License along with this library; if not, write to the Free Software
87 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
88 USA.
89
90
91
92
93Comedi 05/11/2017 COMEDI_GET_HARDCAL_C(3)