Cleanup docs and unused files

This commit is contained in:
Henrik Stickann 2023-01-21 23:38:53 +01:00
parent 600b2d01c7
commit 2d516bd318
5 changed files with 24 additions and 68 deletions

View File

@ -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 <var_name>`: 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 <period_ticks>`: Set period in ticks of heartbeat timer (default: 1000)
* `#define STA_RTOS_WATCHDOG_TIMER_HANDLE <var_name>`: Override variable name of heartbeat timer handle (default: heartbeatHandle)
* `#define STA_RTOS_WATCHDOG_TIMER_CALLBACK <func_name>`: Override name of heartbeat timer callback function (default: heartbeatCallback)
* `#define STA_RTOS_WATCHDOG_HANDLE <var_name>`: Override variable name of watchdog task handle (default: watchdogHandle)
* `#define STA_RTOS_WATCHDOG_ENTRY_FUNCTION <func_name>`: 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 `<sta/rtos2/startup.hpp>` 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 `<sta/rtos/startup.hpp>` can be implemented by the application.
Configuration:
* `#define STA_RTOS_STARTUP_ENABLE`: Enable module
* `#define STA_RTOS_STARTUP_ENTRY_FUNCTION <func_name>`: 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 `<sta/config.hpp>`.
Configuration:
* `#define STA_RTOS_SYSTEM_TASKS_ENABLE`: Enable all modules required for system tasks
* `#define STA_RTOS_WATCHDOG_TIMER_NAME <name>`: Override handle and callback name for watchdog timer
* `#define STA_RTOS_WATCHDOG_NAME <name>`: Override handle and entry function name for watchdog task

View File

@ -5,8 +5,6 @@
#ifndef STA_RTOS_EASY_CONFIG_HPP
#define STA_RTOS_EASY_CONFIG_HPP
#include <sta/rtos/system/names.hpp>
/**
* @defgroup STA_RTOS_EasyConfig Easy Config
@ -19,7 +17,7 @@
#ifdef DOXYGEN
/**
* @brief Don't warn about use of <rtos2/easy_config.hpp> outside of <sta/config.hpp>.
* @brief Don't warn about use of <rtos/easy_config.hpp> outside of <sta/config.hpp>.
*
* @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

View File

@ -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

View File

@ -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

View File

@ -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