User`s manual

RabbitFLEX User’s Manual www.rabbit.com 91
6.6.5 Analog Inputs
flexAnaInCalib
int flexAnaInCalib(Flex_IOPin *pin, int value1, float volts1, int
value2, float volts2);
DESCRIPTION
Calibrates the response of the selected A/D converter channel as a linear function using the two
conversion points provided. Gain and offset constants are calculated and placed into a global ta-
ble. This function is non-reentrant.
PARAMETERS
pin Pointer to the information structure for this I/O pin.
value1 The first A/D converter value.
volts1 The voltage corresponding to the first A/D converter value.
value2 The second A/D converter value.
volts2 The voltage corresponding to the second A/D converter value.
RETURN VALUE
0: success
<0: error (not an analog input?)
SEE ALSO
flexAnaIn, flexAnaInVolts