RK3288 android7

Basic Parameters

touch.deviceType = touchScreen
touch.orientationAware = 1

keyboard.layout = qwerty
keyboard.characterMap = qwerty
keyboard.orientationAware = 1
keyboard.builtIn = 1

cursor.mode = navigation
cursor.orientationAware = 1

device.internal = 0



Vendor_0457_Product_0819.idc

#*****************************************************

Input Device Configuration File for the generaltouch touch screen.

#*****************************************************

Basic Parameters

touch.deviceType = touchScreen
touch.orientationAware = 1

keyboard.layout = qwerty
keyboard.characterMap = qwerty
keyboard.orientationAware = 1
keyboard.builtIn = 1

cursor.mode = navigation
cursor.orientationAware = 1

device.internal = 1


##### 2. device/rockchip/rk3288/device.mk,拷贝到系统中:



for usb tp

PRODUCT_COPY_FILES +=
device/rockchip/rk3288/Vendor_222a_Product_0001.idc:system/usr/idc/Vendor_222a_Product_0001.idc
device/rockchip/rk3288/Vendor_0457_Product_0819.idc:system/usr/idc/Vendor_0457_Product_0819.idc


##### 3. kernel/drivers/hid/hid-multitouch.c修改驱动:



diff --git a/kernel/drivers/hid/hid-multitouch.c b/kernel/drivers/hid/hid-multitouch.c
old mode 100644new mode 100755
index 9de379c1b3…b8456b1e50
— a/kernel/drivers/hid/hid-multitouch.c
+++ b/kernel/drivers/hid/hid-multitouch.c
@@ -98,7 +98,23 @@ struct mt_fields {
unsigned usages[HID_MAX_FIELDS];
unsigned int length;
};

+#define GTP_SWAP(x, y) do{\

  •                                     typeof(x) z = x;\
    
  •                                     x = y;\
    
  •                                     y = z;\
    
  •                                   }while (0)
    

+#define MAINmGtpChange_X2Y 1
+#define MIANmGtp_X_Reverse 1
+#define MAINNmGtp_Y_Reverse 0
+static int MAINX_max=0;
+static int MAINY_max=0;
+
+#define AUXmGtpChange_X2Y 1
+#define AUXmGtp_X_Reverse 1
+#define AUXNmGtp_Y_Reverse 0
+static int AUXX_max=0;
+static int AUXY_max=0;
struct mt_device {
struct mt_slot curdata; /* placeholder of incoming data */
struct mt_class mtclass; /* our mt device class */
@@ -461,6 +477,14 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
case HID_UP_GENDESK:
switch (usage->hid) {
case HID_GD_X:

  •   if (hdev->vendor==0x0457 && hdev->product==0x0819)
    
  •   {
    
  •       MAINX_max =     field->logical_maximum;
    
  •   }
    
  •   else if (hdev->vendor==0x222a && hdev->product ==0x0001)
    
  •   {
    
  •       AUXX_max =  field->logical_maximum;
    
  •   }
          if (prev_usage && (prev_usage->hid == usage->hid)) {
              hid\_map\_usage(hi, usage, bit, max,
                  EV_ABS, ABS_MT_TOOL_X);
    

@@ -476,6 +500,14 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
mt_store_field(usage, td, hi);
return 1;
case HID_GD_Y:

  •   if (hdev->vendor==0x0457 && hdev->product==0x0819)
    
  •   {
    
  •       MAINY_max =     field->logical_maximum;
    
  •   }
    
  •   else if (hdev->vendor==0x222a && hdev->product ==0x0001)
    
  •   {
    
  •       AUXY_max =  field->logical_maximum;
    
  •   }
          if (prev_usage && (prev_usage->hid == usage->hid)) {
              hid\_map\_usage(hi, usage, bit, max,
                  EV_ABS, ABS_MT_TOOL_Y);
    

@@ -613,8 +645,10 @@ static int mt_compute_slot(struct mt_device *td, struct input_dev *input)
* this function is called when a whole contact has been processed,
* so that it can assign it to a slot and store the data there
*/
-static void mt_complete_slot(struct mt_device *td, struct input_dev *input)
+static void mt_complete_slot(struct mt_device *td, struct input_dev *input,struct hid_device *hid_device)
{
+
+
if ((td->mtclass.quirks & MT_QUIRK_CONTACT_CNT_ACCURATE) &&
td->num_received >= td->num_expected)
return;
@@ -649,7 +683,33 @@ static void mt_complete_slot(struct mt_device *td, struct input_dev *input)
int major = max(s->w, s->h) >> 1;
int minor = min(s->w, s->h) >> 1;

  •       input\_event(input, EV_ABS, ABS_MT_POSITION_X, s->x);
    

+if (hid_device->vendor0x0457 && hid_device->product0x0819)
+{

  • #if MAINmGtpChange_X2Y
  •   GTP\_SWAP(s->x, s->y);
    
  • #endif
  •   if(MIANmGtp_X_Reverse){
    
  •       s->x = MAINX_max -s->x;+       }
    
  •   if(MAINNmGtp_Y_Reverse){
    
  •       s->y = MAINY_max - s->y;
    
  •   }
    

+}
+else if (hid_device->vendor0x222a && hid_device->product0x0001)

最后

自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数Java工程师,想要提升技能,往往是自己摸索成长,自己不成体系的自学效果低效漫长且无助。

因此收集整理了一份《2024年嵌入式&物联网开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。

img

img

img

img

img

img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上嵌入式&物联网开发知识点,真正体系化!

如果你觉得这些内容对你有帮助,需要这份全套学习资料的朋友可以戳我获取!!

由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新!!

点,真正体系化!**

如果你觉得这些内容对你有帮助,需要这份全套学习资料的朋友可以戳我获取!!

由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新!!

  • 24
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值