mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-08-06 11:07:34 +00:00
Add semaphore based signal implementation
This commit is contained in:
27
include/sta/os2/signal.hpp
Normal file
27
include/sta/os2/signal.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef STA_OS2_SIGNAL_HPP
|
||||
#define STA_OS2_SIGNAL_HPP
|
||||
|
||||
#include <sta/signal.hpp>
|
||||
|
||||
#include <cmsis_os2.h>
|
||||
|
||||
|
||||
namespace sta
|
||||
{
|
||||
class Os2Signal : public Signal
|
||||
{
|
||||
public:
|
||||
Os2Signal(osSemaphoreId_t * semaphore);
|
||||
|
||||
void notify() override;
|
||||
bool peek() override;
|
||||
bool test() override;
|
||||
void wait() override;
|
||||
|
||||
private:
|
||||
osSemaphoreId_t * semaphore_;
|
||||
};
|
||||
} // namespace sta
|
||||
|
||||
|
||||
#endif // STA_OS2_SIGNAL_HPP
|
Reference in New Issue
Block a user