Touchscreen offset and calibration

666 views
Skip to first unread message

Simon Bagley

unread,
Aug 4, 2015, 10:30:54 AM8/4/15
to android-porting
I am porting the touchscreen driver for use on a TI DM3730 based board with Android ICS 4.0.3, which uses a four wire resistive touch panel on top of a WVGA (800x480) LCD.

The board uses the TSC2046 touchscreen driver IC which operates in the same way as the ADS7846, hence we are using the ADS7846 driver files.

The problem I am experiencing is when I touch the screen, the touch location is offset from my touch point in the Y axis (shorter axis, as in landscape orientation). I can add an offset to the reported y value, in the ADS7846.c file, just before the call to input_report_abs(input, ABS_Y, y), which solves the offset problem, but I don't think this should be necessary. I have modified the ads7846_probe() function to use the logged xmin, xmax, ymin, ymax values for my particular board and touchpanel combination. These are reported in the calls to input_set_abs_params(...).

Why is the y pointer position offset from my actual touch position?

I have read in the Android AOSP documentation that .idc file is needed, but where should this be located so it gets included in the built filesystem?

Gary Bisson

unread,
Aug 19, 2015, 11:01:40 AM8/19/15
to android-porting
Hi Simon,

You can look at the grouper device folder as an example:

Once you've created your idc file, you just need to add it in the PRODUC_COPY_FILES as follows:

Hope this helps.

Gary

Simon Bagley

unread,
Sep 16, 2015, 12:37:22 PM9/16/15
to android-porting
Hi Gary,

thanks - I now know how to get the idc file included.

Regards,
Simon
Reply all
Reply to author
Forward
0 new messages