mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-08-06 11:07:34 +00:00
Add startup and watchdog modules
This commit is contained in:
13
include/sta/os2.hpp
Normal file
13
include/sta/os2.hpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef STA_OS2_HPP
|
||||
#define STA_OS2_HPP
|
||||
|
||||
|
||||
// See limits defined in cmsis_os2.c
|
||||
#define STA_OS2_MAX_BITS_TASK_NOTIFY 31U
|
||||
#define STA_OS2_MAX_BITS_EVENT_GROUPS 24U
|
||||
|
||||
#define STA_OS2_THREAD_FLAGS_VALID_BITS ((1UL << STA_OS2_MAX_BITS_TASK_NOTIFY) - 1U)
|
||||
#define STA_OS2_EVENT_FLAGS_VALID_BITS ((1UL << STA_OS2_MAX_BITS_EVENT_GROUPS) - 1U)
|
||||
|
||||
|
||||
#endif // STA_OS2_HPP
|
@@ -11,7 +11,7 @@
|
||||
// System event flags
|
||||
//
|
||||
|
||||
#define STA_SYSTEM_EVENT_STARTUP 0x00100000U
|
||||
#define STA_SYSTEM_EVENT_STARTUP 0x100000U
|
||||
|
||||
|
||||
namespace sta
|
||||
@@ -32,6 +32,7 @@ namespace sta
|
||||
*/
|
||||
void waitForSystemEvents(uint32_t flags, uint32_t options, uint32_t timeout);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Signal startup system event
|
||||
*/
|
||||
@@ -48,4 +49,4 @@ namespace sta
|
||||
|
||||
#endif // STA_SYSTEM_EVENT_ENABLE
|
||||
|
||||
#endif // STA_SYSTEM_EVENT_HPP
|
||||
#endif // STA_SYSTEM_EVENT_HPP
|
||||
|
26
include/sta/watchdog.hpp
Normal file
26
include/sta/watchdog.hpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef STA_WATCHDOG_HPP
|
||||
#define STA_WATCHDOG_HPP
|
||||
|
||||
#include <sta/config.hpp>
|
||||
|
||||
#ifdef STA_WATCHDOG_ENABLE
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
// Watchdog task flags
|
||||
//
|
||||
|
||||
#define STA_WATCHDOG_FLAG_HEARTBEAT 0x00001000U
|
||||
|
||||
|
||||
namespace sta
|
||||
{
|
||||
void startWatchdogTimer();
|
||||
void notifyWatchdog(uint32_t flags);
|
||||
} // namespace sta
|
||||
|
||||
|
||||
#endif // STA_WATCHDOG_ENABLE
|
||||
|
||||
#endif // STA_WATCHDOG_HPP
|
Reference in New Issue
Block a user