mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-08-06 11:07:34 +00:00
Rename to STA RTOS
This commit is contained in:
39
include/sta/rtos/signal.hpp
Normal file
39
include/sta/rtos/signal.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief RTOS signal implementation.
|
||||
*/
|
||||
#ifndef STA_RTOS_SIGNAL_HPP
|
||||
#define STA_RTOS_SIGNAL_HPP
|
||||
|
||||
#include <sta/intf/signal.hpp>
|
||||
|
||||
#include <cmsis_os2.h>
|
||||
|
||||
|
||||
namespace sta
|
||||
{
|
||||
/**
|
||||
* @brief Implementation of Signal interface using CMSIS RTOS2.
|
||||
*
|
||||
* @ingroup STA_RTOS_API
|
||||
*/
|
||||
class RTOSSignal : public Signal
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @param semaphore CMSIS RTOS2 semaphore
|
||||
*/
|
||||
RTOSSignal(osSemaphoreId_t * semaphore);
|
||||
|
||||
void notify() override;
|
||||
bool peek() override;
|
||||
bool test() override;
|
||||
void wait() override;
|
||||
|
||||
private:
|
||||
osSemaphoreId_t * semaphore_; /**< CMSIS RTOS2 semaphore */
|
||||
};
|
||||
} // namespace sta
|
||||
|
||||
|
||||
#endif // STA_RTOS_SIGNAL_HPP
|
Reference in New Issue
Block a user