hook.c 452 B

123456789101112131415161718192021
  1. #include "includes.h"
  2. /*钩子pt任务
  3. 处理一些缓慢的小操作*/
  4. PT_THREAD (ptHookTask(pt_timer_t *ptPool, struct pt *pt)){
  5. static pt_timer_t ptTimer;
  6. PT_BEGIN(pt);
  7. while(1){
  8. chargeStatusCheck();
  9. gpsCntChecker();
  10. sysInfoShow();
  11. ticketStatusShow();
  12. apCtlMcu();
  13. setMcuPara(FALSE);
  14. PTTimerStart(ptPool, &ptTimer,100);//need set to 1 seconds
  15. PT_WAIT_UNTIL(pt, PTTimerIsExpired(&ptTimer));
  16. }
  17. PT_END(pt);
  18. }