mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-12-16 18:08:04 +00:00
Rework. Improve doxygen documentation
This commit is contained in:
@@ -1,26 +1,49 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief Helper for easy system task setup in `<sta/config.hpp>`.
|
||||
*
|
||||
* Configuration:
|
||||
* STA_OS2_SYSTEM_TASKS_ENABLE: Enable all system tasks and required features
|
||||
* STA_OS2_WATCHDOG_TIMER_NAME: Set watchdog timer handle and callback names based on this
|
||||
* STA_OS2_WATCHDOG_NAME: Set watchdog task handle and entry function names based on this
|
||||
*/
|
||||
#ifndef STA_RTOS2_EASY_CONFIG_HPP
|
||||
#define STA_RTOS2_EASY_CONFIG_HPP
|
||||
|
||||
/**
|
||||
* @defgroup rtos2EasyConfig Easy Config
|
||||
* @ingroup rtos2BuildConfig
|
||||
* @brief Helpers for easy RTOS2 module setup.
|
||||
*
|
||||
* Use this header only inside the <sta/config.hpp> header of your application.
|
||||
*/
|
||||
|
||||
|
||||
#ifdef DOXYGEN
|
||||
/**
|
||||
* @brief Don't warn about use of <rtos2/easy_config.hpp> outside of <sta/config.hpp>.
|
||||
*
|
||||
* @ingroup rtos2EasyConfig
|
||||
*/
|
||||
# define STA_RTOS2_EASY_CONFIG_NO_WARNING
|
||||
#endif // DOXYGEN
|
||||
|
||||
#if !defined(STA_CONFIG_HPP) && !defined(STA_RTOS2_EASY_CONFIG_NO_WARNING)
|
||||
#warning "Intended for use in <sta/config.hpp>"
|
||||
#endif // !STA_CONFIG_HPP && !STA_RTOS2_EASY_CONFIG_NO_WARNING
|
||||
|
||||
|
||||
#ifdef STA_RTOS2_SYSTEM_TASKS_ENABLE
|
||||
#ifdef DOXYGEN
|
||||
/**
|
||||
* @brief Enable all system tasks and required features.
|
||||
*
|
||||
* @ingroup rtos2EasyConfig
|
||||
*/
|
||||
# define STA_RTOS2_EASY_CONFIG_SYSTEM_TASKS_ENABLE
|
||||
#endif // DOXYGEN
|
||||
|
||||
#ifdef STA_RTOS2_EASY_CONFIG_SYSTEM_TASKS_ENABLE
|
||||
// Enable system events used by system tasks
|
||||
# define STA_RTOS2_SYSTEM_EVENT_ENABLE
|
||||
// Enable system tasks
|
||||
# define STA_RTOS2_WATCHDOG_ENABLE
|
||||
# define STA_RTOS2_STARTUP_ENABLE
|
||||
#endif // STA_RTOS2_SYSTEM_TASKS_ENABLE
|
||||
#endif // STA_RTOS2_EASY_CONFIG_SYSTEM_TASKS_ENABLE
|
||||
|
||||
|
||||
#define _STA_RTOS2_CONCAT(a, b) a ## b
|
||||
@@ -29,17 +52,34 @@
|
||||
#define STA_RTOS2_MAKE_CALLBACK_NAME(name) _STA_RTOS2_CONCAT(name, Callback)
|
||||
#define STA_RTOS2_MAKE_TASK_NAME(name) _STA_RTOS2_CONCAT(name, Task)
|
||||
|
||||
// Use common base name for watchdog timer handle and callback
|
||||
#ifdef STA_RTOS2_WATCHDOG_TIMER_NAME
|
||||
# define STA_RTOS2_WATCHDOG_TIMER_HANDLE STA_RTOS2_MAKE_HANDLE_NAME(STA_RTOS2_WATCHDOG_TIMER_NAME)
|
||||
# define STA_RTOS2_WATCHDOG_TIMER_CALLBACK STA_RTOS2_MAKE_CALLBACK_NAME(STA_RTOS2_WATCHDOG_TIMER_NAME)
|
||||
#endif // STA_RTOS2_WATCHDOG_TIMER_NAME
|
||||
|
||||
// Use common base name for watchdog task handle and entry function
|
||||
#ifdef STA_RTOS2_WATCHDOG_NAME
|
||||
# define STA_RTOS2_WATCHDOG_HANDLE STA_RTOS2_MAKE_HANDLE_NAME(STA_RTOS2_WATCHDOG_NAME)
|
||||
# define STA_RTOS2_WATCHDOG_ENTRY_FUNCTION STA_RTOS2_MAKE_TASK_NAME(STA_RTOS2_WATCHDOG_NAME)
|
||||
#endif // STA_RTOS2_WATCHDOG_NAME
|
||||
#ifdef DOXYGEN
|
||||
/**
|
||||
* @brief Common base name used for watchdog timer handle and callback names.
|
||||
*
|
||||
* @ingroup rtos2EasyConfig
|
||||
*/
|
||||
# define STA_RTOS2_EASY_CONFIG_WATCHDOG_TIMER_NAME
|
||||
#endif // DOXYGEN
|
||||
|
||||
#ifdef STA_RTOS2_EASY_CONFIG_WATCHDOG_TIMER_NAME
|
||||
# define STA_RTOS2_WATCHDOG_TIMER_HANDLE STA_RTOS2_MAKE_HANDLE_NAME(STA_RTOS2_EASY_CONFIG_WATCHDOG_TIMER_NAME)
|
||||
# define STA_RTOS2_WATCHDOG_TIMER_CALLBACK STA_RTOS2_MAKE_CALLBACK_NAME(STA_RTOS2_EASY_CONFIG_WATCHDOG_TIMER_NAME)
|
||||
#endif // STA_RTOS2_EASY_CONFIG_WATCHDOG_TIMER_NAME
|
||||
|
||||
#ifdef DOXYGEN
|
||||
/**
|
||||
* @brief Common base name used for watchdog task handle and entry function names.
|
||||
*
|
||||
* @ingroup rtos2EasyConfig
|
||||
*/
|
||||
# define STA_RTOS2_EASY_CONFIG_WATCHDOG_NAME
|
||||
#endif // DOXYGEN
|
||||
|
||||
#ifdef STA_RTOS2_EASY_CONFIG_WATCHDOG_NAME
|
||||
# define STA_RTOS2_WATCHDOG_HANDLE STA_RTOS2_MAKE_HANDLE_NAME(STA_RTOS2_EASY_CONFIG_WATCHDOG_NAME)
|
||||
# define STA_RTOS2_WATCHDOG_ENTRY_FUNCTION STA_RTOS2_MAKE_TASK_NAME(STA_RTOS2_EASY_CONFIG_WATCHDOG_NAME)
|
||||
#endif // STA_RTOS2_EASY_CONFIG_WATCHDOG_NAME
|
||||
|
||||
|
||||
#endif // STA_RTOS2_EASY_CONFIG_HPP
|
||||
|
||||
Reference in New Issue
Block a user