FreeRTOS C++ Wrappers  1.6.0
C++ interface to FreeRTOS
Public Member Functions | List of all members
cpp_freertos::CountingSemaphore Class Reference

#include <semaphore.hpp>

Inheritance diagram for cpp_freertos::CountingSemaphore:
Inheritance graph
[legend]
Collaboration diagram for cpp_freertos::CountingSemaphore:
Collaboration graph
[legend]

Public Member Functions

 CountingSemaphore (UBaseType_t maxCount, UBaseType_t initialCount)
 
- Public Member Functions inherited from cpp_freertos::Semaphore
bool Take (TickType_t Timeout=portMAX_DELAY)
 
bool Give ()
 
bool TakeFromISR (BaseType_t *pxHigherPriorityTaskWoken)
 
bool GiveFromISR (BaseType_t *pxHigherPriorityTaskWoken)
 
virtual ~Semaphore ()
 

Additional Inherited Members

- Protected Member Functions inherited from cpp_freertos::Semaphore
 Semaphore ()
 
- Protected Attributes inherited from cpp_freertos::Semaphore
SemaphoreHandle_t handle
 

Detailed Description

Wrapper class for Counting Semaphores.

Definition at line 216 of file semaphore.hpp.

Constructor & Destructor Documentation

◆ CountingSemaphore()

CountingSemaphore::CountingSemaphore ( UBaseType_t  maxCount,
UBaseType_t  initialCount 
)

Constructor to create a counting semaphore. This ctor throws a SemaphoreCreateException on failure.

Parameters
maxCountMust be greater than 0.
initialCountMust not be greater than maxCount.
Exceptions
SemaphoreCreateExceptionon failure.
Returns
Instance of a CountingSemaphore.

Definition at line 115 of file csemaphore.cpp.


The documentation for this class was generated from the following files: