1
0
forked from fsfw/fsfw

integrated interface into bin semaphore

This commit is contained in:
2020-05-18 19:38:02 +02:00
parent 9ba21b1e28
commit 4dd6594845
3 changed files with 27 additions and 9 deletions

View File

@ -132,6 +132,17 @@ void BinarySemaphore::resetSemaphore() {
}
}
ReturnValue_t BinarySemaphore::acquire(uint32_t timeoutMs) {
return takeBinarySemaphore(timeoutMs);
}
ReturnValue_t BinarySemaphore::release() {
return giveBinarySemaphore();
}
uint8_t BinarySemaphore::getSemaphoreCounter() {
return uxSemaphoreGetCount(handle);
}
// Be careful with the stack size here. This is called from an ISR!
ReturnValue_t BinarySemaphore::giveBinarySemaphoreFromISR(SemaphoreHandle_t semaphore,