modemUartTask.c 265 B

12345678910111213141516171819202122232425
  1. #include "includes.h"
  2. PT_THREAD (ptModemUartTask(struct pt *pt)){
  3. static timer_t ptTimer;
  4. PT_BEGIN(pt);
  5. while(1){
  6. Uart2RecvProcess();
  7. PTTimerStart(&pt_timerPool, &ptTimer, 1);
  8. PT_WAIT_UNTIL(pt, PTTimerIsExpired(&ptTimer));
  9. }
  10. PT_END(pt);
  11. }