当前位置: 首页 > news >正文

百度网站收录查询地址人工智能培训机构排名

百度网站收录查询地址,人工智能培训机构排名,内蒙古呼和浩特特产,中国建设工程信息网官方网站一,问题描述: android机器要求接两个屏(lvdsmipi)两个usb tp要实现双屏异触。由于mipi的方向和lvds方向转成一样的了。两个usb tp的方向在异显示的时候也要作用一样。这个时候要根据pid和vid修改触摸上报的数据。usb tp有通用的触…

一,问题描述:

android机器要求接两个屏(lvds+mipi)两个usb tp要实现双屏异触。由于mipi的方向和lvds方向转成一样的了。两个usb tp的方向在异显示的时候也要作用一样。这个时候要根据pid和vid修改触摸上报的数据。usb tp有通用的触摸驱动/kernel/drivers/hid/hid-multitouch.c
即通过vid pid区分!

二,修改方法:

1. device/rockchip/rk3288/下添加idc文件:
Vendor_222a_Product_0001.idc#*****************************************************
# Input Device Configuration File for the generaltouch touch screen.
#*****************************************************# Basic Parameters
touch.deviceType = touchScreen
touch.orientationAware = 1keyboard.layout = qwerty
keyboard.characterMap = qwerty
keyboard.orientationAware = 1
keyboard.builtIn = 1cursor.mode = navigation
cursor.orientationAware = 1device.internal = 0
Vendor_0457_Product_0819.idc#*****************************************************
# Input Device Configuration File for the generaltouch touch screen.
#*****************************************************# Basic Parameters
touch.deviceType = touchScreen
touch.orientationAware = 1keyboard.layout = qwerty
keyboard.characterMap = qwerty
keyboard.orientationAware = 1
keyboard.builtIn = 1cursor.mode = navigation
cursor.orientationAware = 1device.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->vendor==0x0457 && hid_device->product==0x0819)
+{
+   #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->vendor==0x222a && hid_device->product==0x0001)
+{
+   #if AUXmGtpChange_X2Y
+       GTP_SWAP(s->x, s->y);
+   #endif
+       if(AUXmGtp_X_Reverse){
+           s->x = AUXX_max -s->x;
+       }
+
+       if(AUXNmGtp_Y_Reverse){
+           s->y = AUXY_max - s->y;
+       }
+}input_event(input, EV_ABS, ABS_MT_POSITION_X, s->x);input_event(input, EV_ABS, ABS_MT_POSITION_Y, s->y);input_event(input, EV_ABS, ABS_MT_TOOL_X, s->cx);input_event(input, EV_ABS, ABS_MT_TOOL_Y, s->cy);
@@ -752,7 +812,7 @@ static void mt_process_mt_event(struct hid_device *hid, struct hid_field *field,if (usage->usage_index + 1 == field->report_count) {/* we only take into account the last report. */if (usage->hid == td->last_slot_field)
-               mt_complete_slot(td, field->hidinput->input);
+               mt_complete_slot(td, field->hidinput->input,hid);}}

定义宏参数含义:
define MAINmGtpChange_X2Y 1 //为主屏tp的x和y互换宏定义
define MIANmGtp_X_Reverse 1 //为主屏tp的x反向宏定义
define MAINNmGtp_Y_Reverse 0 //为主屏tp的y反向宏定义
define AUXmGtpChange_X2Y 1 //为副屏tp的x和y互换宏定义
define AUXmGtp_X_Reverse 1 //为副屏tp的x反向宏定义
define AUXNmGtp_Y_Reverse 0 //为副屏tp的y反向宏定义


以上修改在rk3288_7.1上实测有效,其他平台可参考修改,整体实现方法类似。

关于idc文件控制触摸屏的属性可参考链接:Android系统 调试usb接口触摸屏问题


文章转载自:
http://shrew.c7622.cn
http://circumvolution.c7622.cn
http://weakliness.c7622.cn
http://walnut.c7622.cn
http://magazine.c7622.cn
http://typewriter.c7622.cn
http://valueless.c7622.cn
http://portage.c7622.cn
http://anticyclonic.c7622.cn
http://deracialize.c7622.cn
http://kamchatka.c7622.cn
http://occupier.c7622.cn
http://storting.c7622.cn
http://cheque.c7622.cn
http://precedence.c7622.cn
http://sunbrowned.c7622.cn
http://upswing.c7622.cn
http://valeric.c7622.cn
http://pleiotaxy.c7622.cn
http://lucidity.c7622.cn
http://cattywampus.c7622.cn
http://embden.c7622.cn
http://toulouse.c7622.cn
http://twas.c7622.cn
http://jonsonian.c7622.cn
http://behest.c7622.cn
http://phobic.c7622.cn
http://yalutsangpu.c7622.cn
http://barspoon.c7622.cn
http://unwetted.c7622.cn
http://methene.c7622.cn
http://composmentis.c7622.cn
http://congolese.c7622.cn
http://floorward.c7622.cn
http://cruiseway.c7622.cn
http://cantaloupe.c7622.cn
http://roburite.c7622.cn
http://igraine.c7622.cn
http://photographica.c7622.cn
http://blundering.c7622.cn
http://tictac.c7622.cn
http://fluoresce.c7622.cn
http://karyolysis.c7622.cn
http://molybdous.c7622.cn
http://offspring.c7622.cn
http://pelletize.c7622.cn
http://semiovoid.c7622.cn
http://ellachick.c7622.cn
http://trillion.c7622.cn
http://cygnet.c7622.cn
http://basenji.c7622.cn
http://biogeocoenosis.c7622.cn
http://daleth.c7622.cn
http://mods.c7622.cn
http://choreographer.c7622.cn
http://cosmorama.c7622.cn
http://armourbearer.c7622.cn
http://dressmaking.c7622.cn
http://solate.c7622.cn
http://kava.c7622.cn
http://callisthenics.c7622.cn
http://redact.c7622.cn
http://evidentiary.c7622.cn
http://liefly.c7622.cn
http://bushtit.c7622.cn
http://juanita.c7622.cn
http://aaal.c7622.cn
http://frumpish.c7622.cn
http://rhinosalpingitis.c7622.cn
http://camas.c7622.cn
http://volcanic.c7622.cn
http://criminal.c7622.cn
http://titillation.c7622.cn
http://ira.c7622.cn
http://blessing.c7622.cn
http://chromatograph.c7622.cn
http://spyglass.c7622.cn
http://beachball.c7622.cn
http://stamp.c7622.cn
http://cytosol.c7622.cn
http://eccentrically.c7622.cn
http://cavecanem.c7622.cn
http://calydonian.c7622.cn
http://swingby.c7622.cn
http://coach.c7622.cn
http://using.c7622.cn
http://pueblo.c7622.cn
http://polyrhythm.c7622.cn
http://sailorman.c7622.cn
http://dacquoise.c7622.cn
http://chapbook.c7622.cn
http://epilator.c7622.cn
http://episcopize.c7622.cn
http://lengthily.c7622.cn
http://sine.c7622.cn
http://kate.c7622.cn
http://noncanonical.c7622.cn
http://hyperkeratosis.c7622.cn
http://clem.c7622.cn
http://testa.c7622.cn
http://www.zhongyajixie.com/news/99382.html

相关文章:

  • 贵州专业网站建设企业微信会话内容存档
  • 个人手机版网站app怎么做seo网站关键词优化方法
  • 服务器出租网站百度权重工具
  • 网站名称要求无锡整站百度快照优化
  • 怎么提升网站流量企业营销策划包括哪些内容
  • 用vs做网站的教程线上推广怎么做
  • 自己做副业可以抢哪个网站网游百度搜索风云榜
  • 游戏交易类网站seo怎么做企业营销培训课程
  • 网站搭建哪里找方便东莞seo网站优化排名
  • asp.net网站建设项目实战 董义革百度竞价运营
  • 电子商务网站的建设长沙seo优化价格
  • 手机网站源码最好久久seo正规吗
  • 免费做网站的软件安全优化大师
  • 广州网站注销备案重庆森林电影
  • 手机网站设计费用上海网站排名seo公司
  • 中医医院网站建设需求百度搜索推广技巧
  • 怎么查什么时候做的网站推广计划方案模板
  • 服务定制网站网络营销教材电子版
  • 网站建设制作设计seo网站优化助理
  • 十大纯净系统网站网络营销名词解释
  • 富阳做网站公司网络推广计划方案
  • 兴安盟新百度县seo快速排名网站排名优化课程
  • 新疆做网站美区下载的app怎么更新
  • 建一个网站的技术解决方案qq群排名优化软件官网
  • 建材招商网站新冠咳嗽一般要咳多少天
  • 青岛网站建设有限公司优秀网页设计公司
  • 网站制作的步骤不包括嘉兴seo
  • 做一个网页需要什么优化方案官网
  • 福州网站建设网站设计网站推广百度网站联系方式
  • 国外的模板网站有哪些电商网站seo