mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-08-06 19:17:34 +00:00
Add system events handling
This commit is contained in:
45
include/sta/system_event.hpp
Normal file
45
include/sta/system_event.hpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#ifndef STA_SYSTEM_EVENT_HPP
|
||||
#define STA_SYSTEM_EVENT_HPP
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
// System event flags
|
||||
//
|
||||
|
||||
#define STA_SYSTEM_EVENT_STARTUP 0x00100000U
|
||||
|
||||
|
||||
namespace sta
|
||||
{
|
||||
/**
|
||||
* @brief Signal system events
|
||||
*
|
||||
* @param flags System event flags
|
||||
*/
|
||||
void signalSystemEvents(uint32_t flags);
|
||||
|
||||
/**
|
||||
* @brief Wait for system event.
|
||||
*
|
||||
* @param flags System event flags
|
||||
* @param options osFlagsWaitAll or osFlagsWaitAny (osFlagsNoClear always set)
|
||||
* @param timeout Wait timeout (0 = instant, osWaitForever = infinite)
|
||||
*/
|
||||
void waitForSystemEvents(uint32_t flags, uint32_t options, uint32_t timeout);
|
||||
|
||||
/**
|
||||
* @brief Signal startup system event
|
||||
*/
|
||||
void signalStartupCompleted();
|
||||
|
||||
/**
|
||||
* @brief Wait for startup system event.
|
||||
*
|
||||
* Blocking while waiting
|
||||
*/
|
||||
void waitForStartup();
|
||||
} // namespace sta
|
||||
|
||||
|
||||
#endif // STA_SYSTEM_EVENT_HPP
|
Reference in New Issue
Block a user