From e4f795d209f36bbfaa39a1d03e46c759d4a86acd Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Sat, 11 Jul 2020 13:38:14 +0200 Subject: [PATCH] stack high watermark in bytes now --- osal/FreeRTOS/TaskManagement.cpp | 4 ++-- osal/FreeRTOS/TaskManagement.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osal/FreeRTOS/TaskManagement.cpp b/osal/FreeRTOS/TaskManagement.cpp index 9a1e4447..704f9d34 100644 --- a/osal/FreeRTOS/TaskManagement.cpp +++ b/osal/FreeRTOS/TaskManagement.cpp @@ -18,7 +18,7 @@ TaskHandle_t TaskManagement::getCurrentTaskHandle() { return xTaskGetCurrentTaskHandle(); } -configSTACK_DEPTH_TYPE TaskManagement::getTaskStackHighWatermark( +size_t TaskManagement::getTaskStackHighWatermark( TaskHandle_t task) { - return uxTaskGetStackHighWaterMark(task); + return uxTaskGetStackHighWaterMark(task) * sizeof(StackType_t); } diff --git a/osal/FreeRTOS/TaskManagement.h b/osal/FreeRTOS/TaskManagement.h index cbde510c..ea363359 100644 --- a/osal/FreeRTOS/TaskManagement.h +++ b/osal/FreeRTOS/TaskManagement.h @@ -57,7 +57,7 @@ public: * @return Smallest value of stack remaining since the task was started in * words. */ - static configSTACK_DEPTH_TYPE getTaskStackHighWatermark( + static size_t getTaskStackHighWatermark( TaskHandle_t task = nullptr); };