mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-06-12 02:36:00 +00:00
75 lines
2.8 KiB
Markdown
75 lines
2.8 KiB
Markdown
# STA RTOS Utilities
|
|
|
|

|
|

|
|
|
|
Library using CMSIS-RTOS2 functionality for RTOS projects.
|
|
|
|
Modules are enabled via defines set in `<sta/config.hpp>` header which must be provided by the application.
|
|
|
|
|
|
# Interface implementations
|
|
|
|
The library provides implementations for the following interfaces using CMSIS-RTOS2 functionality:
|
|
* `Mutex`
|
|
* `Signal`
|
|
|
|
|
|
# Modules
|
|
|
|
## System Event
|
|
|
|
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)
|
|
|
|
|
|
Requirements:
|
|
* RTOS: event flag
|
|
|
|
|
|
## Watchdog
|
|
|
|
The watchdog task waits for signals sent either from the heartbeat timer or manually via `sta::notifyWatchdog`
|
|
and forwards the event flags to the `sta::watchdogEventHandler` function implemented by the application.
|
|
|
|
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
|
|
|
|
|
|
## Startup
|
|
|
|
The entry function for the startup task must be called manually 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.
|
|
|
|
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
|
|
|
|
|
|
## Easy Config
|
|
|
|
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
|