PROCESS_EVENT_POLL事件
ev = PROCESS_EVENT_NONE; //事件...PROCESS_EVENT_NONE
PROCESS_WAIT_UNTIL(ev == PROCESS_EVENT_POLL); //等待ev == PROCESS_EVENT_POLL
系统定义10个事件:
PROCESS_EVENT_NONE
PROCESS_EVENT_INIT
PROCESS_EVENT_POLL
PROCESS_EVENT_EXIT
PROCESS_EVENT_SERVICE_REMOVED
PROCESS_EVENT_CONTINUE
PROCESS_EVENT_MSG
PROCESS_EVENT_EXITED
PROCESS_EVENT_TIMER
PROCESS_EVENT_COM
PROCESS_EVENT_MAX
事件:PROCESS_EVENT_POLL 产生 ,调用process_poll(&test2_process);
事件:PROCESS_EVENT_TIMER 产生:
etimer_set(&et, 200); 20ms;
ev = PROCESS_EVENT_NONE; 先将事件置空;
PROCESS_WAIT_UNTIL(etimer_expired(&et)); //等待事件发生
异步事件:
process_post(&TEST_PROCESS, event_done, NULL); //异步发送event_done给TEST_PROCESS进程...