From 2d516bd3189400098b2f8fad9a2028b8c759d556 Mon Sep 17 00:00:00 2001 From: Henrik Stickann <4376396-Mithradir@users.noreply.gitlab.com> Date: Sat, 21 Jan 2023 23:38:53 +0100 Subject: [PATCH] Cleanup docs and unused files --- README.md | 39 +++++++++++------------ include/sta/rtos/easy_config.hpp | 33 +------------------ include/sta/rtos/system/names.hpp | 12 ------- include/sta/rtos/system/system_events.hpp | 4 +-- src/system/system_events.cpp | 4 +-- 5 files changed, 24 insertions(+), 68 deletions(-) delete mode 100644 include/sta/rtos/system/names.hpp diff --git a/README.md b/README.md index 53d8390..9951443 100644 --- a/README.md +++ b/README.md @@ -17,17 +17,15 @@ The library provides implementations for the following interfaces using CMSIS-RT # Modules -## System Event +## System Events Provides an interface for common system events. Configuration: -* `#define STA_RTOS_SYSTEM_EVENT_ENABLE`: Enable module -* `#define STA_RTOS_SYSTEM_EVENT_HANDLE `: Override variable name of flag handle (default: systemEventHandle) +* `#define STA_RTOS_SYSTEM_EVENTS_ENABLE`: Enable module - -Requirements: -* RTOS: event flag +When enabled a new global event flag will be created. Initialization will be handled by the Startup module +if enabled. ## Watchdog @@ -38,30 +36,33 @@ and forwards the event flags to the `sta::watchdogEventHandler` function impleme Configuration: * `#define STA_RTOS_WATCHDOG_ENABLE`: Enable module * `#define STA_RTOS_WATCHDOG_TIMER_PERIOD `: Set period in ticks of heartbeat timer (default: 1000) -* `#define STA_RTOS_WATCHDOG_TIMER_HANDLE `: Override variable name of heartbeat timer handle (default: heartbeatHandle) -* `#define STA_RTOS_WATCHDOG_TIMER_CALLBACK `: Override name of heartbeat timer callback function (default: heartbeatCallback) -* `#define STA_RTOS_WATCHDOG_HANDLE `: Override variable name of watchdog task handle (default: watchdogHandle) -* `#define STA_RTOS_WATCHDOG_ENTRY_FUNCTION `: Override name of watchdog task entry function (default: watchdogTask) Requirements: -* Uses the `System Event` module -* RTOS: timer + task +* `System Events` module + + +## Can Bus + +TODO Add description + +Configuration: + +Requirements: +* `System Events` module ## Startup -The entry function for the startup task must be called manually from the default task. +The `startALPAKA` function must be called from the default task. -It provides all setup required by the enabled system tasks. If additional initialization is required by the -application the function `void sta::startupExtras(void *)` declared in `` can be implemented. +It provides all setup required by the enabled system tasks. If additional initialization is required +the function `void sta::startupExtras(void *)` declared in `` can be implemented by the application. Configuration: * `#define STA_RTOS_STARTUP_ENABLE`: Enable module -* `#define STA_RTOS_STARTUP_ENTRY_FUNCTION `: Override name of startup task entry function (default: startupTask) Requirements: -* Uses the `System Event` module -* RTOS: task +* `System Events` module ## Easy Config @@ -70,5 +71,3 @@ Simplify configuration of modules. Intended for use in ``. Configuration: * `#define STA_RTOS_SYSTEM_TASKS_ENABLE`: Enable all modules required for system tasks -* `#define STA_RTOS_WATCHDOG_TIMER_NAME `: Override handle and callback name for watchdog timer -* `#define STA_RTOS_WATCHDOG_NAME `: Override handle and entry function name for watchdog task diff --git a/include/sta/rtos/easy_config.hpp b/include/sta/rtos/easy_config.hpp index 1ead253..afa135f 100644 --- a/include/sta/rtos/easy_config.hpp +++ b/include/sta/rtos/easy_config.hpp @@ -5,8 +5,6 @@ #ifndef STA_RTOS_EASY_CONFIG_HPP #define STA_RTOS_EASY_CONFIG_HPP -#include - /** * @defgroup STA_RTOS_EasyConfig Easy Config @@ -19,7 +17,7 @@ #ifdef DOXYGEN /** - * @brief Don't warn about use of outside of . + * @brief Don't warn about use of outside of . * * @ingroup STA_RTOS_EasyConfig */ @@ -50,33 +48,4 @@ #endif // STA_RTOS_EASY_CONFIG_SYSTEM_TASKS_ENABLE -#ifdef DOXYGEN -/** - * @brief Common base name used for watchdog timer handle and callback names. - * - * @ingroup STA_RTOS_EasyConfig - */ -# define STA_RTOS_EASY_CONFIG_WATCHDOG_TIMER_NAME -#endif // DOXYGEN - -#ifdef STA_RTOS_EASY_CONFIG_WATCHDOG_TIMER_NAME -# define STA_RTOS_WATCHDOG_TIMER_HANDLE STA_RTOS_MAKE_HANDLE_NAME(STA_RTOS_EASY_CONFIG_WATCHDOG_TIMER_NAME) -# define STA_RTOS_WATCHDOG_TIMER_CALLBACK STA_RTOS_MAKE_CALLBACK_NAME(STA_RTOS_EASY_CONFIG_WATCHDOG_TIMER_NAME) -#endif // STA_RTOS_EASY_CONFIG_WATCHDOG_TIMER_NAME - -#ifdef DOXYGEN -/** - * @brief Common base name used for watchdog task handle and entry function names. - * - * @ingroup STA_RTOS_EasyConfig - */ -# define STA_RTOS_EASY_CONFIG_WATCHDOG_NAME -#endif // DOXYGEN - -#ifdef STA_RTOS_EASY_CONFIG_WATCHDOG_NAME -# define STA_RTOS_WATCHDOG_HANDLE STA_RTOS_MAKE_HANDLE_NAME(STA_RTOS_EASY_CONFIG_WATCHDOG_NAME) -# define STA_RTOS_WATCHDOG_ENTRY_FUNCTION STA_RTOS_MAKE_TASK_NAME(STA_RTOS_EASY_CONFIG_WATCHDOG_NAME) -#endif // STA_RTOS_EASY_CONFIG_WATCHDOG_NAME - - #endif // STA_RTOS_EASY_CONFIG_HPP diff --git a/include/sta/rtos/system/names.hpp b/include/sta/rtos/system/names.hpp deleted file mode 100644 index d123dae..0000000 --- a/include/sta/rtos/system/names.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef STA_RTOS_SYSTEM_NAMES_HPP -#define STA_RTOS_SYSTEM_NAMES_HPP - - -#define _STA_RTOS_CONCAT(a, b) a ## b - -#define STA_RTOS_MAKE_HANDLE_NAME(name) _STA_RTOS_CONCAT(name, Handle) -#define STA_RTOS_MAKE_CALLBACK_NAME(name) _STA_RTOS_CONCAT(name, Callback) -#define STA_RTOS_MAKE_ENTRY_NAME(name) _STA_RTOS_CONCAT(name, Task) - - -#endif // STA_RTOS_SYSTEM_NAMES_HPP diff --git a/include/sta/rtos/system/system_events.hpp b/include/sta/rtos/system/system_events.hpp index 3018090..41d1542 100644 --- a/include/sta/rtos/system/system_events.hpp +++ b/include/sta/rtos/system/system_events.hpp @@ -20,7 +20,7 @@ * * @ingroup STA_RTOS_BuildConfig */ -# define STA_RTOS2_SYSTEM_EVENTS_ENABLE +# define STA_RTOS_SYSTEM_EVENTS_ENABLE #endif // DOXYGEN @@ -39,7 +39,7 @@ * * @ingroup STA_RTOS_SysEvent */ -#define STA_SYSTEM_EVENTS_STARTUP 0x100000U +#define STA_RTOS_SYSTEM_EVENTS_STARTUP 0x100000U namespace sta diff --git a/src/system/system_events.cpp b/src/system/system_events.cpp index 3e02ece..44a15c0 100644 --- a/src/system/system_events.cpp +++ b/src/system/system_events.cpp @@ -51,12 +51,12 @@ namespace sta void signalStartupEvent() { - signalSystemEvents(STA_SYSTEM_EVENTS_STARTUP); + signalSystemEvents(STA_RTOS_SYSTEM_EVENTS_STARTUP); } void waitForStartupEvent() { - waitForSystemEvents(STA_SYSTEM_EVENTS_STARTUP, osFlagsWaitAll, osWaitForever); + waitForSystemEvents(STA_RTOS_SYSTEM_EVENTS_STARTUP, osFlagsWaitAll, osWaitForever); } } // namespace rtos } // namespace sta