Simplify system events API

This commit is contained in:
Henrik Stickann
2023-01-20 15:07:00 +01:00
parent f866e27081
commit 1c8e427bc3
2 changed files with 48 additions and 30 deletions

View File

@@ -2,10 +2,8 @@
* @file
* @brief Implementation of system events.
*/
#ifndef STA_RTOS_SYSTEM_SYSTEM_EVENT_HPP
#define STA_RTOS_SYSTEM_SYSTEM_EVENT_HPP
#include <sta/rtos/system/names.hpp>
#ifndef STA_RTOS_SYSTEM_SYSTEM_EVENTS_HPP
#define STA_RTOS_SYSTEM_SYSTEM_EVENTS_HPP
/**
@@ -22,23 +20,13 @@
*
* @ingroup STA_RTOS_BuildConfig
*/
# define STA_RTOS2_SYSTEM_EVENT_ENABLE
# define STA_RTOS2_SYSTEM_EVENTS_ENABLE
#endif // DOXYGEN
/**
* @def STA_RTOS_SYSTEM_EVENT_NAME
* @brief Set name of system event flags.
*
* @ingroup STA_RTOS_BuildConfig
*/
#ifndef STA_RTOS_SYSTEM_EVENT_NAME
# define STA_RTOS_SYSTEM_EVENT_NAME systemEvent
#endif // !STA_RTOS_SYSTEM_EVENT_NAME
#include <sta/config.hpp>
#ifdef STA_RTOS_SYSTEM_EVENT_ENABLE
#ifdef STA_RTOS_SYSTEM_EVENTS_ENABLE
#include <cstdint>
@@ -51,13 +39,19 @@
*
* @ingroup STA_RTOS_SysEvent
*/
#define STA_SYSTEM_EVENT_STARTUP 0x100000U
#define STA_SYSTEM_EVENTS_STARTUP 0x100000U
namespace sta
{
namespace rtos
{
/**
* @brief Initialize system events.
*/
void initSystemEvents();
/**
* @brief Signal system events.
*
@@ -98,6 +92,6 @@ namespace sta
} // namespace sta
#endif // STA_RTOS_SYSTEM_EVENT_ENABLE
#endif // STA_RTOS_SYSTEM_EVENTS_ENABLE
#endif // STA_RTOS_SYSTEM_SYSTEM_EVENT_HPP
#endif // STA_RTOS_SYSTEM_SYSTEM_EVENTS_HPP