rtos2-utils/README.md
2023-01-21 23:38:53 +01:00

74 lines
1.9 KiB
Markdown

# STA RTOS Utilities
![pre-release v0.1.0](https://img.shields.io/static/v1?label=pre-release&message=v0.1.0&color=orange&logo=git)
![Standard: C++11](https://img.shields.io/static/v1?label=standard&message=C%2B%2B11&color=blue&logo=cplusplus)
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 Events
Provides an interface for common system events.
Configuration:
* `#define STA_RTOS_SYSTEM_EVENTS_ENABLE`: Enable module
When enabled a new global event flag will be created. Initialization will be handled by the Startup module
if enabled.
## 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)
Requirements:
* `System Events` module
## Can Bus
TODO Add description
Configuration:
Requirements:
* `System Events` module
## Startup
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
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
Requirements:
* `System Events` module
## 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