mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-06-12 02:36:00 +00:00
37 lines
1.2 KiB
C++
37 lines
1.2 KiB
C++
/**
|
|
* @brief Helper for easy system task setup in <sta/config.hpp>.
|
|
*
|
|
* Define STA_OS2_SYSTEM_TASKS_ENABLE before including this header
|
|
* to enable all system tasks and required features.
|
|
*/
|
|
#ifndef STA_OS2_EASY_CONFIG_HPP
|
|
#define STA_OS2_EASY_CONFIG_HPP
|
|
|
|
#ifndef STA_CONFIG_HPP
|
|
#warning "Intended for use in <sta/config.hpp>"
|
|
#endif // STA_CONFIG_HPP
|
|
|
|
|
|
#ifdef STA_OS2_SYSTEM_TASKS_ENABLE
|
|
// Enable system events used by system tasks
|
|
# define STA_OS2_SYSTEM_EVENT_ENABLE
|
|
// Enable system tasks
|
|
# define STA_OS2_WATCHDOG_ENABLE
|
|
# define STA_OS2_STARTUP_ENABLE
|
|
#endif // STA_OS2_SYSTEM_TASKS_ENABLE
|
|
|
|
// Use common base name for watchdog timer handle and callback
|
|
#ifdef STA_OS2_WATCHDOG_TIMER_NAME
|
|
# define STA_OS2_WATCHDOG_TIMER_HANDLE STA_OS2_WATCHDOG_TIMER_NAME ## Handle
|
|
# define STA_OS2_WATCHDOG_TIMER_CALLBACK STA_OS2_WATCHDOG_TIMER_NAME ## Callback
|
|
#endif // STA_OS2_WATCHDOG_TIMER_NAME
|
|
|
|
// Use common base name for watchdog task handle and entry function
|
|
#ifdef STA_OS2_WATCHDOG_NAME
|
|
# define STA_OS2_WATCHDOG_HANDLE STA_OS2_WATCHDOG_NAME ## Handle
|
|
# define STA_OS2_WATCHDOG_ENTRY_FUNCTION STA_OS2_WATCHDOG_NAME ## Task
|
|
#endif // STA_OS2_WATCHDOG_NAME
|
|
|
|
|
|
#endif // STA_OS2_EASY_CONFIG_HPP
|