Gradually migrate to FreeRTOS

This commit is contained in:
2024-06-04 09:54:09 +08:00
parent db774bfd76
commit 92c0ee6bd8
15 changed files with 143 additions and 161 deletions

View File

@@ -34,31 +34,31 @@ void vApplicationTickHook(void)
/* The full demo includes a software timer demo/test that requires
prodding periodically from the tick interrupt. */
/*完整的演示包括软件定时器演示/测试,需要
从滴答声中断中周期性地发出提示*/
从滴答声中断中周期性地发出提示 */
#if (mainENABLE_TIMER_DEMO == 1)
vTimerPeriodicISRTests();
#endif
/* Call the periodic queue overwrite from ISR demo. */
/*调用ISR演示中的周期性队列覆盖*/
/*调用ISR演示中的周期性队列覆盖 */
#if (mainENABLE_QUEUE_OVERWRITE == 1)
vQueueOverwritePeriodicISRDemo();
#endif
/* Call the periodic event group from ISR demo. */
/*从ISR演示中调用定期事件组*/
/*从ISR演示中调用定期事件组 */
#if (mainENABLE_EVENT_GROUP == 1)
vPeriodicEventGroupsProcessing();
#endif
/* Call the code that uses a mutex from an ISR. */
/*从ISR调用使用互斥的代码*/
/*从ISR调用使用互斥的代码 */
#if (mainENABLE_INTERRUPT_SEMAPHORE == 1)
vInterruptSemaphorePeriodicTest();
#endif
/* Call the code that 'gives' a task notification from an ISR. */
/*调用从ISR“发出”任务通知的代码*/
/*调用从ISR“发出”任务通知的代码 */
#if (mainENABLE_TASK_NOTIFY == 1)
xNotifyTaskFromISR();
#endif
@@ -66,16 +66,12 @@ void vApplicationTickHook(void)
#endif
}
void _printTaskStackHighWaterMark(const char *task_name)
{
TaskHandle_t currentTask = xTaskGetCurrentTaskHandle();
if (currentTask != NULL)
{
if (currentTask != NULL) {
printf("%s TASK STACK HIGH WATER MARK: %ld\n", task_name, uxTaskGetStackHighWaterMark(currentTask));
}
else
{
} else {
printf("FAILED TO GET CURRENT TASK HANDLE.\n");
}
}