BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pvTaskCode,
const char * const pcName,
const uint32_t usStackDepth,
void * const pvParameters,
UBaseType_t uxPriority,
TaskHandle_t * const pvCreatedTask,
const BaseType_t xCoreID);
esp32的xTaskCreate等这些函数
usStackDepth:任务栈大小(字节为单位)。不同于原版FreeRTOS以word为单位(1word=4byte)
uxTaskGetStackHighWaterMark
返回的也是字节为单位。
--------------------------
源代码上有注释
@param usStackDepth The size of the task stack specified as the number of bytes. Note that this differs from vanilla FreeRTOS.
@return The smallest amount of free stack space there has been (in bytes rather than words as found in vanilla FreeRTOS) since the task referenced by xTask was created.
本文解析了ESP32中xTaskCreate函数的usStackDepth参数,探讨了其与标准FreeRTOS的区别,并介绍了uxTaskGetStackHighWaterMark的功能,帮助理解任务栈的动态变化。
1996

被折叠的 条评论
为什么被折叠?



