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年进入阿里一直到现在。
深知大多数嵌入式工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年嵌入式&物联网开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上嵌入式&物联网开发知识点,真正体系化!
由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新
如果你觉得这些内容对你有帮助,可以+V:Vip1104z获取!!! (备注:嵌入式)
最后
资料整理不易,觉得有帮助的朋友可以帮忙点赞分享支持一下小编~
你的支持,我的动力;祝各位前程似锦,offer不断,步步高升!!!
sdnimg.cn/images/73bb5de17851459088c6af944156ee24.jpg" alt=“img” style=“zoom: 67%;” />
最后
资料整理不易,觉得有帮助的朋友可以帮忙点赞分享支持一下小编~
你的支持,我的动力;祝各位前程似锦,offer不断,步步高升!!!