From 7145982b4ade5f3da12e8dd05161b11e45512998 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Wed, 27 May 2020 19:59:59 +0200 Subject: [PATCH] improved documentation --- osal/FreeRTOS/BinSemaphUsingTask.cpp | 2 +- osal/FreeRTOS/BinSemaphUsingTask.h | 6 ++++++ tasks/SemaphoreIF.h | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/osal/FreeRTOS/BinSemaphUsingTask.cpp b/osal/FreeRTOS/BinSemaphUsingTask.cpp index 0d732054..d6bc02bc 100644 --- a/osal/FreeRTOS/BinSemaphUsingTask.cpp +++ b/osal/FreeRTOS/BinSemaphUsingTask.cpp @@ -19,7 +19,7 @@ ReturnValue_t BinarySemaphoreUsingTask::takeBinarySemaphore(uint32_t timeoutMs) if(timeoutMs == SemaphoreIF::MAX_TIMEOUT) { timeout = SemaphoreIF::MAX_TIMEOUT; } - else if(timeoutMs > BinarySemaphoreUsingTask::NO_TIMEOUT){ + else if(timeoutMs > SemaphoreIF::NO_TIMEOUT){ timeout = pdMS_TO_TICKS(timeoutMs); } diff --git a/osal/FreeRTOS/BinSemaphUsingTask.h b/osal/FreeRTOS/BinSemaphUsingTask.h index 2736b1db..8b8a7773 100644 --- a/osal/FreeRTOS/BinSemaphUsingTask.h +++ b/osal/FreeRTOS/BinSemaphUsingTask.h @@ -9,6 +9,12 @@ extern "C" { #include } +/** + * @brief Binary Semaphore implementation using Task Notifications + * @details + * Additional information: https://www.freertos.org/RTOS-task-notifications.html + * and general semaphore documentation. + */ class BinarySemaphoreUsingTask: public SemaphoreIF, public HasReturnvaluesIF { public: diff --git a/tasks/SemaphoreIF.h b/tasks/SemaphoreIF.h index b2b113f1..fb181cca 100644 --- a/tasks/SemaphoreIF.h +++ b/tasks/SemaphoreIF.h @@ -12,7 +12,8 @@ * A semaphore is a synchronization primitive. * See: https://en.wikipedia.org/wiki/Semaphore_(programming) * A semaphore can be used to achieve task synchonization and track the - * availability of resources. + * availability of resources by using either the binary or the counting + * semaphore types. * * If mutual exlcusion of a resource is desired, a mutex should be used, * which is a special form of a semaphore and has an own interface.