FreeRTOS::Semaphore¶
詳細情報¶
メンバー¶
Semaphore()¶
FreeRTOS::Semaphore::Semaphore(std::string owner="<Unknown>")
引数
- std::string
owner
~Semaphore()¶
FreeRTOS::Semaphore::~Semaphore()
give()¶
Give a semaphore. The is given.
void FreeRTOS::Semaphore::give()
give()¶
Give a semaphore. The is given with an associated value.
void FreeRTOS::Semaphore::give(uint32_t value)
引数
- uint32_t
value
The value to associate with the semaphore.
giveFromISR()¶
Give a semaphore from an ISR.
void FreeRTOS::Semaphore::giveFromISR()
setName()¶
Set the name of the semaphore.
void FreeRTOS::Semaphore::setName(std::string name)
引数
- std::string
name
The name of the semaphore.
take()¶
Take a semaphore. Take a semaphore and wait indefinitely.
bool FreeRTOS::Semaphore::take(std::string owner="<Unknown>")
引数
- std::string
owner
The new owner (for debugging)
戻り値
bool True if we took the semaphore.
take()¶
Take a semaphore. Take a semaphore but return if we haven't obtained it in the given period of milliseconds.
bool FreeRTOS::Semaphore::take(uint32_t timeoutMs, std::string owner="<Unknown>")
引数
- uint32_t
timeoutMs
Timeout in milliseconds. - std::string
owner
The new owner (for debugging)
戻り値
bool True if we took the semaphore.
toString()¶
Create a string representation of the semaphore.
std::string FreeRTOS::Semaphore::toString()
戻り値
std::string A string representation of the semaphore.
wait()¶
Wait for a semaphore to be released by trying to take it and then releasing it again.
uint32_t FreeRTOS::Semaphore::wait(std::string owner="<Unknown>")
引数
- std::string
owner
A debug tag.
戻り値
uint32_t The value associated with the semaphore.
timedWait()¶
Wait for a semaphore to be released in a given period of time by trying to take it and then releasing it again. The value associated with the semaphore can be taken by call after return
bool FreeRTOS::Semaphore::timedWait(std::string owner="<Unknown>", uint32_t timeoutMs=portMAX_DELAY)
引数
- std::string
owner
A debug tag. - uint32_t
timeoutMs
timeout to wait in ms.
戻り値
bool True if we took the semaphore within timeframe.
value()¶
uint32_t FreeRTOS::Semaphore::value()
戻り値
uint32_t