improved documentation
This commit is contained in:
parent
eabee85ba9
commit
7145982b4a
@ -19,7 +19,7 @@ ReturnValue_t BinarySemaphoreUsingTask::takeBinarySemaphore(uint32_t timeoutMs)
|
|||||||
if(timeoutMs == SemaphoreIF::MAX_TIMEOUT) {
|
if(timeoutMs == SemaphoreIF::MAX_TIMEOUT) {
|
||||||
timeout = SemaphoreIF::MAX_TIMEOUT;
|
timeout = SemaphoreIF::MAX_TIMEOUT;
|
||||||
}
|
}
|
||||||
else if(timeoutMs > BinarySemaphoreUsingTask::NO_TIMEOUT){
|
else if(timeoutMs > SemaphoreIF::NO_TIMEOUT){
|
||||||
timeout = pdMS_TO_TICKS(timeoutMs);
|
timeout = pdMS_TO_TICKS(timeoutMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,12 @@ extern "C" {
|
|||||||
#include <freertos/task.h>
|
#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,
|
class BinarySemaphoreUsingTask: public SemaphoreIF,
|
||||||
public HasReturnvaluesIF {
|
public HasReturnvaluesIF {
|
||||||
public:
|
public:
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
* A semaphore is a synchronization primitive.
|
* A semaphore is a synchronization primitive.
|
||||||
* See: https://en.wikipedia.org/wiki/Semaphore_(programming)
|
* See: https://en.wikipedia.org/wiki/Semaphore_(programming)
|
||||||
* A semaphore can be used to achieve task synchonization and track the
|
* 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,
|
* 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.
|
* which is a special form of a semaphore and has an own interface.
|
||||||
|
Loading…
Reference in New Issue
Block a user