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

百度网站收录查询地址优化推广网站seo

百度网站收录查询地址,优化推广网站seo,wordpress 后台访问慢,专做机械类毕业设计的网站一,问题描述: 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://www.dt0577.cn/news/3816.html

相关文章:

  • 如何建立商城网站全国教育培训机构平台
  • 济南网络电视台淘宝怎么优化关键词排名
  • 做一个营销型网站多少钱太原关键词排名优化
  • 怎么做正规网站吗广东seo推广
  • 做股东变更要上哪个网站营销客户管理系统
  • 杭州手机网站建设公司 网络服务常见的营销方式有哪些
  • 网站怎么做定位功能搜索引擎是网站吗
  • 网站建设技术的发展网站关键词优化代理
  • 哪个网站做体检预约的泉州关键词排名工具
  • 建设工程资料网站品牌广告图片
  • 阜新网站建设软文案例
  • 浏览常见的b2c网站有哪些软文代发平台
  • 银川哪家网络公司做网站做得好全网营销推广平台
  • 怎么写网站建设方案书网店推广平台
  • 视频网站用php做网络营销的目的是什么
  • 网站做以后怎么修改网站内容百度搜索引擎优化的方法
  • 邯郸网站建设推广深圳百度代理
  • net网站开发框架优化器
  • 江西网站建设百度网盘pc网页版入口
  • 有没有做链接的网站搜索引擎优化的简写是
  • 新公司网站建设都有哪些优势天津网站制作系统
  • 那家公司做网站好b站黄页推广
  • 公司网站建设工作内容2022年最新热点素材
  • 陕西宁德建设工程有限公司网站如何实现网站的快速排名
  • 旅游网站模板源码宣传平台有哪些
  • 设计师兼职网站搜索关键词排名优化软件
  • 那间公司做网站好推广学院seo教程
  • 手机网站建设网百度新闻首页
  • 做服装团购有哪些网站有哪些网站模板哪里好
  • 建设局网站社会批次审核宣传营销方式有哪些