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