触摸屏校准值,在Android/内核中是如何完成的?
我正在将 Android Gingerbread 移植到我的定制板(带有 Samsung S5PV210 处理器)。我有一个带有 ESC7000 芯片的触摸屏。我在 /kernel/drivers/input/touchscreen/usbtouchscreen.c 中找到了一个驱动程序。它几乎可以工作,但 USB 数据包中的位范围、顺序和字节顺序不好。我修改了代码以获得正确的原始位置(在控制台上使用 printk 来查看它),现在它几乎可以工作了。我的数据范围从xmin,ymin到xmax,ymax是420,430到3650,3650,而理论上它应该是0,0到4095,4095。这并不奇怪,因为电容式触摸需要校准。这是一个简单的校准,例如每个轴的 y=mx+b(简单线性校准)。我环顾驱动程序,但无法弄清楚校准是在哪里进行的。它必须是可编程的,因为它依赖于单元,并且在系统生产中要针对每个单元进行一次校准。我想像其他 Android 设备一样干净。有人知道Android系统中校准信息存储在哪里吗?进行补偿计算的代码在哪里?任何与此相关的网络搜索都会提供有关想要重新校准手机的人的信息。所以对我来说没什么用。
I'm porting Android Gingerbread to my custom board (with a Samsung S5PV210 processor). I have a touch screen with an ESC7000 chip. I found a driver in /kernel/drivers/input/touchscreen/usbtouchscreen.c . It almost worked but the bit range, order and byte ordering was not good in the USB packets. I modified the code to get the right RAW position (used printk on console to see it) and now it almost works. My data range from xmin, ymin to xmax, ymax is 420,430 to 3650, 3650 while in theory, it should be 0,0 to 4095,4095. That is not surprising since a capacitive touch needs calibration. This is a simple calibration like y=mx+b for each axis (simple linear calibration). I looked around in the drivers and I can't figure out where the calibration is processed. It has to be programmable since it's unit dependent and is to be calibrated for each unit one time in system production. I want to do it clean like other Android device. Anybody knows where the calibration information is stored in an Android system? Where is the code doing the compensation calculation. Any web search about that gives information about people wanting to recalibrate their phone. So it's useless for me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请查看以下帖子:https://groups.google.com /forum/#!msg/rowboat/jlbwnmCIDg0/makHFil31pQJ
Have a look at the following thread: https://groups.google.com/forum/#!msg/rowboat/jlbwnmCIDg0/makHFil31pQJ