improved documentation

This commit is contained in:
Robin Müller 2020-05-27 19:59:59 +02:00
parent eabee85ba9
commit 7145982b4a
3 changed files with 9 additions and 2 deletions

View File

@ -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);
}

View File

@ -9,6 +9,12 @@ extern "C" {
#include <freertos/task.h>
}
/**
* @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:

View File

@ -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.