mtk android tp 執行方式更改

2021-06-09 20:40:10 字數 872 閱讀 4755

將tp執行方式由中斷改為輪詢模式。

步驟1. probe 中建立執行緒

thread = kthread_run(my_touch_event_handler, 0, "msg2133");

步驟2. 完成輪詢函式

static int my_touch_event_handler()

; sched_setscheduler(current, sched_rr, & param);

memset(&cinfo, 0, sizeof(struct touchinfot));

memset(&pinfo, 0, sizeof(struct touchinfot));

do while(0);

//if (tpd_flag == 0 && !pending)

//continue; // if timeout for no touch, then re-wait.

//if (tpd_flag != 0 && pending > 0)

//pending = 0;

tpd_flag = 0;

//tpd_debug_set_time;

} set_current_state(task_running);

if (tpd_touchinfo(&cinfo, &pinfo))

input_sync(tpd->dev);

//tpd_logv("[msg2133]press --->\n");

}else if(cinfo.count==0 && pinfo.count!=0)

}

}while(1);

return 0;

}

Linux Source命令及指令碼的執行方式解析

當我修改了linux裡的 etc profile檔案,我想讓它立刻生效,而不用重新登入 這時就想到用source命令,如 source etc profile 對source進行了學習,並且用它與sh 執行指令碼進行了對比,現在總結一下。source命令 source命令也稱為 點命令 也就是乙個點...

Linux Source命令及指令碼的執行方式解析

當我修改了 etc profile檔案,我想讓它立刻生效,而不用重新登入 這時就想到用 source 命令,如 source etc profile 對source進行了 學習,並且用它與sh 執行指令碼進行了對比,現在總結一下。source命令 source命令也稱為 點命令 也就是乙個點符號 是...

Linux Source命令及指令碼的執行方式解析

當我修改了 etc profile檔案,我想讓它立刻生效,而不用重新登入 這時就想到用 source 命令,如 source etc profile 對source進行了 學習,並且用它與sh 執行指令碼進行了對比,現在總結一下。source命令 source命令也稱為 點命令 也就是乙個點符號 是...