How to get current task handle in FreeRTOS
Simply use xTaskGetCurrentTaskHandle()
#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