User`s manual

96 www.rabbit.com Applications Programming
flexAnaInAverage
int flexAnaInAverage(Flex_IOPin *pin);
DESCRIPTION
This function is like flexAnaIn(), except that it reports the most recent discount averaged val-
ue instead of the raw value.
To set the discount average alpha value, execute the flexAnaInAverageSetting() func-
tion before calling this function.
This function is non-reentrant.
PARAMETER
pin Pointer to the information structure for the selected analog input pin.
RETURN VALUE
0: A value corresponding to the raw voltage (0–4095) on the analog input channel
-1: overflow or out of range
-2: error (not an analog input?)
SEE ALSO
flexAnaInAverageSetting, flexAnaInVoltsAverage,
flexAnaInmAmpsAverage