如何在 FreeRTOS 中获取当前任务句柄
只需使用 xTaskGetCurrentTaskHandle()
how-to-get-current-task-handle-in-freertos.cpp
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
TaskHandle_t myTaskHandle = xTaskGetCurrentTaskHandle();If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow