ESPectro32 Library
Library for using ESPectro32 board
 All Classes Functions Variables Enumerations Enumerator Pages
Public Member Functions | Private Attributes | List of all members
FreeRTOS::Semaphore Class Reference

Public Member Functions

 Semaphore (std::string owner="<Unknown>")
 
void give ()
 Give a semaphore. The Semaphore is given.
 
void giveFromISR ()
 Give a semaphore from an ISR.
 
void give (uint32_t value)
 Give a semaphore. The Semaphore is given with an associated value. More...
 
void setName (std::string name)
 
void take (std::string owner="<Unknown>")
 Take a semaphore. Take a semaphore and wait indefinitely.
 
void take (uint32_t timeoutMs, std::string owner="<Unknown>")
 Take a semaphore. Take a semaphore but return if we haven't obtained it in the given period of milliseconds. More...
 
uint32_t wait (std::string owner="<Unknown>")
 Wait for a semaphore to be released by trying to take it and then releasing it again. More...
 
std::string toString ()
 

Private Attributes

SemaphoreHandle_t m_semaphore
 
std::string m_name
 
std::string m_owner
 
uint32_t m_value
 

Member Function Documentation

void FreeRTOS::Semaphore::give ( uint32_t  value)

Give a semaphore. The Semaphore is given with an associated value.

Parameters
[in]valueThe value to associate with the semaphore.
void FreeRTOS::Semaphore::take ( uint32_t  timeoutMs,
std::string  owner = "<Unknown>" 
)

Take a semaphore. Take a semaphore but return if we haven't obtained it in the given period of milliseconds.

Parameters
[in]timeoutMsTimeout in milliseconds.
uint32_t FreeRTOS::Semaphore::wait ( std::string  owner = "<Unknown>")

Wait for a semaphore to be released by trying to take it and then releasing it again.

Parameters
[in]ownerA debug tag.
Returns
The value associated with the semaphore.

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