This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

zstack中,while(1)与发送消息与定时器问题。[已解决]



我在程序中使用while(1)判断某个PIO状态

这个有超时消息再执行,但是我发现超时消息根本得不到执行,也就是说time_out永远都不会变成1

我想问下我这种应用用什么方法实现比较好?

 

下面附上程序伪代码

time_out = 0

OSAL_START_TIMEREX( task_id, timeoutfun,500)

while(P0_1)

{

    if(time_out)

          return;

}

 

timeoutfun()

{

    time_out = 1;

}