2015年7月24日 星期五

Touch - idc

環境:4.4.2
在弄 FT5X06 時所學到的一個名詞:idc (Input Device Configuration)
(雖然連結的不是廠商給的,至少能動,但會有個小白點)

google 定義的 idc功能:
Input device configuration files (.idc files) contain device-specific configuration properties that affect the behavior of input devices.
Input device configuration files are typically not necessary for standard peripherals such as HID keyboards and mice since the default system behavior usually ensures that they will work out of the box. On the other hand, built-in embedded devices, particularly touch screens, almost always require input device configuration files to specify their behavior.
(上面說明,porting touch一定會需要,那之前沒用也能動…@@)

idc檔案:

  • device/fsl/common/input/  (FreeScale imx6)
  • /system/usr/idc/ (系統)

ex: eGalax_Touch_Screen.idc
    alax_Touch_Screen.idc
    touch.deviceType = touchScreen
    touch.orientationAware = 1
    touch.size.calibration = none
    touch.orientation.calibration = none

ex: Dell_Dell_USB_Keyboard.idc
    touch.deviceType = touchScreen
    touch.orientationAware = 1
    keyboard.layout = Dell_Dell_USB_Keyboard
    keyboard.characterMap = Generic
    keyboard.orientationAware = 1
    keyboard.builtIn = 0
    cursor.mode = navigation
    cursor.orientationAware = 1

在驅動程式中,驅動的name為:Vendor_5697_Product_0008,即input_dev結構的name成員值為:Vendor_5697_Product_0008

ref: wolften  and  Here


$ adb shell dumpsys input > input.txt
裡面有關於Touch比較相關的資訊:
Viewport:
displayId=0, orientation=0,
logicalFrame=[0, 0, 1366, 768],
physicalFrame=[0, 0, 1366, 768],
deviceSize=[1366, 768]
這些值要跟解析度一樣,不然touch可能會有誤差
如果值跟解析度不一樣,可以試著加入

device.internal

Definition: device.internal = 0 | 1
Specifies whether the input device is an internal built-in component as opposed to an externally attached (most likely removable) peripheral.
  • If the value is 0, the device is external.
  • If the value is 1, the device is internal.
  • If the value is not specified, the default value is 0 for all devices on the USB (BUS_USB) or Bluetooth (BUS_BLUETOOTH) bus, 1 otherwise.

沒有留言:

張貼留言