TARGET_TS_DEVICE := "mxc_ts"
ts_calibrator 的 Android.mk
LOCAL_CFLAGS += -DTS_DEVICE=$(TARGET_TS_DEVICE)
ts_calibrator.c 的 code:
#define TS_INPUT_DEV DEV_(TS_DEVICE)
...
static const char dev_name[] = TS_INPUT_DEV;
...
sprintf(param_path,
"/sys/module/%s/parameters/calibration", dev_name);
fd = open(param_path, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
所以 touch calibration sysfs 位置 是 : /sys/module/mxc_ts/parameters/calibration
在 kernel 的 mxc_ts driver 有說明 calibration 裡面的數值意義:
calibration array refers to
(delta_x[0], delta_x[1], delta_x[2], delta_y[0], delta_y[1], delta_y[2], delta).
Which generated by calibration service.
In this driver when we got touch pointer (x', y') from PMIC ADC,
we calculate the display pointer (x,y) by:
x = (delta_x[0] * x' + delta_x[1] * y' + delta_x[2]) / delta;
y = (delta_y[0] * x' + delta_y[1] * y' + delta_y[2]) / delta;
沒有留言:
張貼留言