在android2.3上调试TP时,只需要把linux驱动调通,android就可以正常使用了,而到android4.0上又有些不同了,针对linux驱动,需添加如下内容:
1、在手指按下时需调用如下函数上报Key Down:
input_report_key(struct input_dev *input, BTN_TOUCH, 1);
2、在手指释放时需调用如下函数上报Key Up:
input_report_key(struct input_dev *input, BTN_TOUCH, 0);
-
/system/usr/idc/Vendor_XXXX_Product_XXXX_Version_XXXX.idc
-
/system/usr/idc/Vendor_XXXX_Product_XXXX.idc
-
/system/usr/idc/DEVICE_NAME.idc
-
/data/system/devices/idc/Vendor_XXXX_Product_XXXX_Version_XXXX.idc
-
/data/system/devices/idc/Vendor_XXXX_Product_XXXX.idc
-
/data/system/devices/idc/DEVICE_NAME.idc
为了方便,我直接创建一个“设备名.idc”的文件,直接放到/system/usr/idc/目录下,相应的内容参考如下:
# Basic Parameters
touch.deviceType = touchScreen
touch.orientationAware = 1
# Size
touch.size.calibration = diameter
touch.size.scale = 10
touch.size.bias = 0
touch.size.isSummed = 0
# Pressure
# Driver reports signal strength as pressure.
#
# A normal thumb touch typically registers about 200 signal strength
# units although we don't expect these values to be accurate.
touch.pressure.calibration = amplitude
touch.pressure.scale = 0.005
# Orientation
touch.orientation.calibration = none
这样配置好后,在android4.0上的TP就可以正常使用了,而不会成为滑鼠触屏了。
阅读(807) | 评论(0) | 转发(0) |