mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-08-06 11:07:34 +00:00
Additional constructor for rtos signal
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
#include <sta/rtos/signal.hpp>
|
||||
|
||||
#include <sta/debug/assert.hpp>
|
||||
|
||||
|
||||
namespace sta
|
||||
{
|
||||
RtosSignal::RtosSignal(osSemaphoreId_t semaphore)
|
||||
: semaphore_{semaphore}
|
||||
{}
|
||||
{
|
||||
STA_ASSERT(semaphore != NULL);
|
||||
}
|
||||
|
||||
RtosSignal::RtosSignal(uint32_t max, uint32_t initial /* = 0 */)
|
||||
: semaphore_{osSemaphoreNew(max, initial, NULL)}
|
||||
{
|
||||
STA_ASSERT(semaphore_ != NULL);
|
||||
}
|
||||
|
||||
void RtosSignal::notify()
|
||||
{
|
||||
|
Reference in New Issue
Block a user