Binary Semaphore Wrapper.
More...
#include <SemaphoreCPP.h>
Binary Semaphore Wrapper.
Example Usage:
portBASE_TYPE woken = 0;
...
sema.give_ISR(woken);
...
portYIELD_FROM_ISR(woken);
return;
◆ BinarySemaphore() [1/2]
FreeRTOScpp::BinarySemaphore::BinarySemaphore |
( |
char const * |
name = nullptr | ) |
|
|
inline |
Constructor.
- Parameters
-
name | Name to give semaphore, used for Debug Registry if setup |
References sema.
◆ ~BinarySemaphore()
FreeRTOScpp::BinarySemaphore::~BinarySemaphore |
( |
| ) |
|
|
inline |
Destructor.
Delete the semaphore.
References sema.
◆ BinarySemaphore() [2/2]
◆ give()
bool FreeRTOScpp::BinarySemaphore::give |
( |
| ) |
|
|
inlineoverridevirtual |
◆ give_ISR()
bool FreeRTOScpp::BinarySemaphore::give_ISR |
( |
portBASE_TYPE & |
waswoken | ) |
|
|
inline |
Give the Semaphore inside an ISR.
- Parameters
-
waswoken | The flag variable used to indicate if we need to run the scheduler when we exit the ISR. |
References sema.
◆ operator=()
◆ take() [1/2]
bool FreeRTOScpp::BinarySemaphore::take |
( |
TickType_t |
delay = portMAX_DELAY | ) |
|
|
inlineoverridevirtual |
Take the semaphore.
- Parameters
-
delay | The number of ticks to wait for the semaphore |
Implements FreeRTOScpp::Lockable.
References sema.
◆ take() [2/2]
bool FreeRTOScpp::BinarySemaphore::take |
( |
Time_ms |
delay | ) |
|
|
inline |
◆ take_ISR()
bool FreeRTOScpp::BinarySemaphore::take_ISR |
( |
portBASE_TYPE & |
waswoken | ) |
|
|
inline |
◆ sema
SemaphoreHandle_t FreeRTOScpp::BinarySemaphore::sema |
|
private |
The documentation for this class was generated from the following file: