From 620c9c6ae15008631d506aa57181a11ff5130e52 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 14 Dec 2020 11:19:05 +0100 Subject: [PATCH] taken over freeRTOS changes --- osal/FreeRTOS/BinarySemaphore.cpp | 4 ++-- osal/FreeRTOS/BinarySemaphore.h | 6 +++--- osal/FreeRTOS/Clock.cpp | 3 ++- osal/FreeRTOS/CountingSemaphUsingTask.cpp | 5 +++-- osal/FreeRTOS/CountingSemaphUsingTask.h | 10 ++++------ osal/FreeRTOS/CountingSemaphore.cpp | 5 +++-- osal/FreeRTOS/CountingSemaphore.h | 3 ++- osal/FreeRTOS/MessageQueue.h | 3 ++- osal/FreeRTOS/Mutex.cpp | 2 +- osal/FreeRTOS/MutexFactory.cpp | 4 +++- osal/FreeRTOS/TaskManagement.cpp | 2 +- osal/FreeRTOS/TaskManagement.h | 5 ++--- osal/FreeRTOS/Timekeeper.cpp | 4 ++-- 13 files changed, 30 insertions(+), 26 deletions(-) diff --git a/osal/FreeRTOS/BinarySemaphore.cpp b/osal/FreeRTOS/BinarySemaphore.cpp index 8cc3c495..6fee5c35 100644 --- a/osal/FreeRTOS/BinarySemaphore.cpp +++ b/osal/FreeRTOS/BinarySemaphore.cpp @@ -1,5 +1,5 @@ -#include "../../osal/FreeRTOS/BinarySemaphore.h" -#include "../../osal/FreeRTOS/TaskManagement.h" +#include "BinarySemaphore.h" +#include "TaskManagement.h" #include "../../serviceinterface/ServiceInterfaceStream.h" BinarySemaphore::BinarySemaphore() { diff --git a/osal/FreeRTOS/BinarySemaphore.h b/osal/FreeRTOS/BinarySemaphore.h index c6cedc53..8969d503 100644 --- a/osal/FreeRTOS/BinarySemaphore.h +++ b/osal/FreeRTOS/BinarySemaphore.h @@ -1,5 +1,5 @@ -#ifndef FRAMEWORK_OSAL_FREERTOS_BINARYSEMPAHORE_H_ -#define FRAMEWORK_OSAL_FREERTOS_BINARYSEMPAHORE_H_ +#ifndef FSFW_OSAL_FREERTOS_BINARYSEMPAHORE_H_ +#define FSFW_OSAL_FREERTOS_BINARYSEMPAHORE_H_ #include "../../returnvalues/HasReturnvaluesIF.h" #include "../../tasks/SemaphoreIF.h" @@ -104,4 +104,4 @@ protected: SemaphoreHandle_t handle; }; -#endif /* FRAMEWORK_OSAL_FREERTOS_BINARYSEMPAHORE_H_ */ +#endif /* FSFW_OSAL_FREERTOS_BINARYSEMPAHORE_H_ */ diff --git a/osal/FreeRTOS/Clock.cpp b/osal/FreeRTOS/Clock.cpp index f3d8516a..d3f4e68e 100644 --- a/osal/FreeRTOS/Clock.cpp +++ b/osal/FreeRTOS/Clock.cpp @@ -1,6 +1,7 @@ +#include "Timekeeper.h" + #include "../../timemanager/Clock.h" #include "../../globalfunctions/timevalOperations.h" -#include "../../osal/FreeRTOS/Timekeeper.h" #include #include diff --git a/osal/FreeRTOS/CountingSemaphUsingTask.cpp b/osal/FreeRTOS/CountingSemaphUsingTask.cpp index a47341bc..17cdf7ce 100644 --- a/osal/FreeRTOS/CountingSemaphUsingTask.cpp +++ b/osal/FreeRTOS/CountingSemaphUsingTask.cpp @@ -1,5 +1,6 @@ -#include "../../osal/FreeRTOS/CountingSemaphUsingTask.h" -#include "../../osal/FreeRTOS/TaskManagement.h" +#include "CountingSemaphUsingTask.h" +#include "TaskManagement.h" + #include "../../serviceinterface/ServiceInterfaceStream.h" CountingSemaphoreUsingTask::CountingSemaphoreUsingTask(const uint8_t maxCount, diff --git a/osal/FreeRTOS/CountingSemaphUsingTask.h b/osal/FreeRTOS/CountingSemaphUsingTask.h index 49ff3ee5..f258197b 100644 --- a/osal/FreeRTOS/CountingSemaphUsingTask.h +++ b/osal/FreeRTOS/CountingSemaphUsingTask.h @@ -1,13 +1,11 @@ -#ifndef FRAMEWORK_OSAL_FREERTOS_COUNTINGSEMAPHUSINGTASK_H_ -#define FRAMEWORK_OSAL_FREERTOS_COUNTINGSEMAPHUSINGTASK_H_ +#ifndef FSFW_OSAL_FREERTOS_COUNTINGSEMAPHUSINGTASK_H_ +#define FSFW_OSAL_FREERTOS_COUNTINGSEMAPHUSINGTASK_H_ -#include "../../osal/FreeRTOS/CountingSemaphUsingTask.h" +#include "CountingSemaphUsingTask.h" #include "../../tasks/SemaphoreIF.h" -extern "C" { #include #include -} /** * @brief Couting Semaphore implementation which uses the notification value @@ -102,4 +100,4 @@ private: const uint8_t maxCount; }; -#endif /* FRAMEWORK_OSAL_FREERTOS_COUNTINGSEMAPHUSINGTASK_H_ */ +#endif /* FSFW_OSAL_FREERTOS_COUNTINGSEMAPHUSINGTASK_H_ */ diff --git a/osal/FreeRTOS/CountingSemaphore.cpp b/osal/FreeRTOS/CountingSemaphore.cpp index d1310a6a..a202e480 100644 --- a/osal/FreeRTOS/CountingSemaphore.cpp +++ b/osal/FreeRTOS/CountingSemaphore.cpp @@ -1,6 +1,7 @@ -#include "../../osal/FreeRTOS/CountingSemaphore.h" +#include "CountingSemaphore.h" +#include "TaskManagement.h" + #include "../../serviceinterface/ServiceInterfaceStream.h" -#include "../../osal/FreeRTOS/TaskManagement.h" #include diff --git a/osal/FreeRTOS/CountingSemaphore.h b/osal/FreeRTOS/CountingSemaphore.h index ae2f62ae..6af1d6d2 100644 --- a/osal/FreeRTOS/CountingSemaphore.h +++ b/osal/FreeRTOS/CountingSemaphore.h @@ -1,6 +1,7 @@ #ifndef FRAMEWORK_OSAL_FREERTOS_COUNTINGSEMAPHORE_H_ #define FRAMEWORK_OSAL_FREERTOS_COUNTINGSEMAPHORE_H_ -#include "../../osal/FreeRTOS/BinarySemaphore.h" + +#include "BinarySemaphore.h" /** * @brief Counting semaphores, which can be acquire more than once. diff --git a/osal/FreeRTOS/MessageQueue.h b/osal/FreeRTOS/MessageQueue.h index b99bf7c8..8fa86283 100644 --- a/osal/FreeRTOS/MessageQueue.h +++ b/osal/FreeRTOS/MessageQueue.h @@ -1,10 +1,11 @@ #ifndef FSFW_OSAL_FREERTOS_MESSAGEQUEUE_H_ #define FSFW_OSAL_FREERTOS_MESSAGEQUEUE_H_ +#include "TaskManagement.h" + #include "../../internalError/InternalErrorReporterIF.h" #include "../../ipc/MessageQueueIF.h" #include "../../ipc/MessageQueueMessageIF.h" -#include "../../osal/FreeRTOS/TaskManagement.h" #include #include diff --git a/osal/FreeRTOS/Mutex.cpp b/osal/FreeRTOS/Mutex.cpp index 82f23ff9..9d9638b5 100644 --- a/osal/FreeRTOS/Mutex.cpp +++ b/osal/FreeRTOS/Mutex.cpp @@ -1,4 +1,4 @@ -#include "../../osal/FreeRTOS/Mutex.h" +#include "Mutex.h" #include "../../serviceinterface/ServiceInterfaceStream.h" diff --git a/osal/FreeRTOS/MutexFactory.cpp b/osal/FreeRTOS/MutexFactory.cpp index 1f34cc18..d9569e35 100644 --- a/osal/FreeRTOS/MutexFactory.cpp +++ b/osal/FreeRTOS/MutexFactory.cpp @@ -1,5 +1,7 @@ +#include "Mutex.h" + #include "../../ipc/MutexFactory.h" -#include "../../osal/FreeRTOS/Mutex.h" + //TODO: Different variant than the lazy loading in QueueFactory. //What's better and why? -> one is on heap the other on bss/data diff --git a/osal/FreeRTOS/TaskManagement.cpp b/osal/FreeRTOS/TaskManagement.cpp index b77f12a9..18572045 100644 --- a/osal/FreeRTOS/TaskManagement.cpp +++ b/osal/FreeRTOS/TaskManagement.cpp @@ -1,4 +1,4 @@ -#include "../../osal/FreeRTOS/TaskManagement.h" +#include "TaskManagement.h" void TaskManagement::vRequestContextSwitchFromTask() { vTaskDelay(0); diff --git a/osal/FreeRTOS/TaskManagement.h b/osal/FreeRTOS/TaskManagement.h index 4b7fe3eb..c6c46f21 100644 --- a/osal/FreeRTOS/TaskManagement.h +++ b/osal/FreeRTOS/TaskManagement.h @@ -3,17 +3,16 @@ #include "../../returnvalues/HasReturnvaluesIF.h" -extern "C" { #include #include -} + #include /** * Architecture dependant portmacro.h function call. * Should be implemented in bsp. */ -extern void vRequestContextSwitchFromISR(); +extern "C" void vRequestContextSwitchFromISR(); /*! * Used by functions to tell if they are being called from diff --git a/osal/FreeRTOS/Timekeeper.cpp b/osal/FreeRTOS/Timekeeper.cpp index 836f0b21..d986d832 100644 --- a/osal/FreeRTOS/Timekeeper.cpp +++ b/osal/FreeRTOS/Timekeeper.cpp @@ -1,6 +1,6 @@ -#include "../../osal/FreeRTOS/Timekeeper.h" +#include "Timekeeper.h" -#include "FreeRTOSConfig.h" +#include Timekeeper * Timekeeper::myinstance = nullptr;