FreeRTOS Addons
|
#include <semaphore.hpp>
Public Member Functions | |
CountingSemaphore (UBaseType_t maxCount, UBaseType_t initialCount) | |
Public Member Functions inherited from cpp_freertos::Semaphore | |
virtual | ~Semaphore () |
bool | Give () |
bool | GiveFromISR (BaseType_t *pxHigherPriorityTaskWoken) |
bool | Take (TickType_t Timeout=portMAX_DELAY) |
bool | TakeFromISR (BaseType_t *pxHigherPriorityTaskWoken) |
Additional Inherited Members | |
Protected Member Functions inherited from cpp_freertos::Semaphore | |
Semaphore () | |
Protected Attributes inherited from cpp_freertos::Semaphore | |
SemaphoreHandle_t | handle |
Wrapper class for Counting Semaphores.
CountingSemaphore::CountingSemaphore | ( | UBaseType_t | maxCount, |
UBaseType_t | initialCount | ||
) |
Constructor to create a counting semaphore. This ctor throws a SemaphoreCreateException on failure.
maxCount | Must be greater than 0. |
initialCount | Must not be greater than maxCount. |
SemaphoreCreateException | on failure. |