Forráskód Böngészése

add: 增加对于pc模拟器中tp库的支持

zengeshuai 4 hónapja
szülő
commit
61d5971f93
2 módosított fájl, 6 hozzáadás és 0 törlés
  1. 5 0
      components/tp/luat_lib_tp.c
  2. 1 0
      components/tp/luat_tp.h

+ 5 - 0
components/tp/luat_lib_tp.c

@@ -27,6 +27,7 @@ typedef struct tp_reg {
 }tp_reg_t;
 
 static const tp_reg_t tp_regs[] = {
+#ifndef LUAT_USE_TP_PC
     {"gt911",  &tp_config_gt911},
     // 临时措施, Air780EPM仅开启gt911触摸屏
     #if !defined(TYPE_EC718PM) && !defined(LUAT_USE_TP_TINY)
@@ -37,6 +38,10 @@ static const tp_reg_t tp_regs[] = {
     {"cst820", &tp_config_cst820},
     {"cst9220", &tp_config_cst92xx},
     #endif
+#endif
+#ifdef LUAT_USE_TP_PC
+    {"pc", &tp_config_pc},
+#endif
     {"", NULL}
 };
 

+ 1 - 0
components/tp/luat_tp.h

@@ -70,6 +70,7 @@ extern luat_tp_opts_t tp_config_jd9261t_inited;
 extern luat_tp_opts_t tp_config_ft3x68;
 extern luat_tp_opts_t tp_config_cst820;
 extern luat_tp_opts_t tp_config_cst92xx;
+extern luat_tp_opts_t tp_config_pc;
 
 int luat_tp_init(luat_tp_config_t* luat_tp_config);