软件定时器的回调函数里面调用其他API函数。 比如在回调函数里添加xSemaphoreGive(BinarySemaphore); /* 处理定时器1任务 */ if(ulTimerID == 1) { bsp_LedToggle(2); xSemaphoreGive(BinarySemaphore); //这里添加时间到的通知信号量 } 实验后发现使用:xSemaphoreGiveFromISR(BinarySemaphore,&xHigherPriorityTaskWoken)这个也能工作,这是为什么? |
请先把你的问题叙述清楚 |