From 35594d4b717e5296581f0227e6d952aebf506cf4 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Sun, 3 May 2020 00:48:18 +0200 Subject: [PATCH] goofed up, delay function back in task factory --- osal/FreeRTOS/TaskFactory.cpp | 4 ++++ osal/FreeRTOS/TaskManagement.cpp | 4 ---- osal/FreeRTOS/TaskManagement.h | 7 ------- tasks/TaskFactory.h | 7 ++++++- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/osal/FreeRTOS/TaskFactory.cpp b/osal/FreeRTOS/TaskFactory.cpp index 62015a4c..dc6b1c4e 100644 --- a/osal/FreeRTOS/TaskFactory.cpp +++ b/osal/FreeRTOS/TaskFactory.cpp @@ -44,6 +44,10 @@ ReturnValue_t TaskFactory::deleteTask(PeriodicTaskIF* task) { } } +ReturnValue_t TaskManagement::delayTask(uint32_t delayMs) { + vTaskDelay(pdMS_TO_TICKS(delayMs)); + return HasReturnvaluesIF::RETURN_OK; +} TaskFactory::TaskFactory() { } diff --git a/osal/FreeRTOS/TaskManagement.cpp b/osal/FreeRTOS/TaskManagement.cpp index bda43d8b..52222531 100644 --- a/osal/FreeRTOS/TaskManagement.cpp +++ b/osal/FreeRTOS/TaskManagement.cpp @@ -21,8 +21,4 @@ configSTACK_DEPTH_TYPE TaskManagement::getTaskStackHighWatermark() { return uxTaskGetStackHighWaterMark(TaskManagement::getCurrentTaskHandle()); } -ReturnValue_t TaskManagement::delayTask(uint32_t delayMs) { - vTaskDelay(pdMS_TO_TICKS(delayMs)); - return HasReturnvaluesIF::RETURN_OK; -} diff --git a/osal/FreeRTOS/TaskManagement.h b/osal/FreeRTOS/TaskManagement.h index 11c4c9dc..da0cce2a 100644 --- a/osal/FreeRTOS/TaskManagement.h +++ b/osal/FreeRTOS/TaskManagement.h @@ -58,13 +58,6 @@ public: * words. */ static configSTACK_DEPTH_TYPE getTaskStackHighWatermark(); - - /** - * Function to be called to delay current task - * @param delay The delay in milliseconds - * @return Success of deletion - */ - static ReturnValue_t delayTask(uint32_t delayMs); }; #endif /* FRAMEWORK_OSAL_FREERTOS_TASKMANAGEMENT_H_ */ diff --git a/tasks/TaskFactory.h b/tasks/TaskFactory.h index 31b8b135..f7afa4a2 100644 --- a/tasks/TaskFactory.h +++ b/tasks/TaskFactory.h @@ -60,13 +60,18 @@ public: */ static ReturnValue_t deleteTask(PeriodicTaskIF* task = NULL); + /** + * Function to be called to delay current task + * @param delay The delay in milliseconds + * @return Success of deletion + */ + static ReturnValue_t delayTask(uint32_t delayMs); private: /** * External instantiation is not allowed. */ TaskFactory(); static TaskFactory* factoryInstance; - }; #endif /* FRAMEWORK_TASKS_TASKFACTORY_H_ */