#include <nitro/spi.h>
u32 TP_CalcCalibrateParam( TPCalibrateParam * calibrate,
u16 raw_x1, u16 raw_y1,
u16 dx1, u16 dy1,
u16 raw_x2, u16 raw_y2,
u16 dx2, u16 dy2 );
calibrate | Pointer used for storing the results of the calibration parameters |
raw_x1, raw_y1 | Raw touch panel values acquired at coordinate 1 (0 – 4095) |
dx1, dy1 | Screen coordinates for coordinate 1 |
raw_x2, raw_y2 | Raw touch panel values acquired at coordinate 2 (0 – 4095) |
dx2, dy2 | Screen coordinates for coordinate 2 |
If the arguments are valid parameters, returns 0. If they are not valid parameters, it returns a non-zero value.
This function calculates calibration parameters that are based on coordinates of two points.
Do not use the same x or y values as parameters for coordinates 1 and 2.
TP_GetCalibratedPoint, TP_SetCalibrateParam
04/16/2004 Initial version