get a interpolated value based on a one dimensional lookup table
Parameters
*table_x, pointer to 1D X array
*table_y, pointer to 1D Y array
count, number of elements in X array
val, value of the requested location in x array
mode, LUT_MODE_EXTRAPOLATION, extrapolate based on the array. LUT_MODE_LIMIT, don't extrapolate based on the array. LUT_MODE_KALIBRATION, y value always >=, extrapolating upwar with different (y_max - x_max)
returns the value of the y array
Example Code
Read encoder signals
uint16_t counter;// Set channel A of the encoder to analog input D_ANA3, channel B to D_ANA5, with min value of "0" and max
value "100"
counter =os_incremental_encoder(PORT_INT_INCR_ENCODER, D_ANA3, D_ANA5,0,100);