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.

CC1310 TI15.4TI—RTOS问题

Other Parts Discussed in Thread: CC1310

请教大神们个问题

CC1310 用的是TI—RTOS,请问set Event和posr信号量有什么区别,例如:Util_setEvent(&Sensor_events, SENSOR_START_EVT);Semaphore_post(sensorSem);

什么时候用set事件,什么时候用post信号量呢?还是说这两个要同时出现呢?比如在同一个Task,不同的中断我要去做不同的事件,我应该用Set事件还是发信号量呢?

  • 关于event和semaphore的区别可以在下面链接了解,它们功能类似,event比semaphore使用起来更灵活。

    Util_setEvent与TI-RTOS里的event不太一样,我的理解是,Util_setEvent和Util_clearEvent只是用来设置和清除flag,并不会进行进程间同步。