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,17 +1,79 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief Implementation of watchdog system task.
|
||||
*
|
||||
* Configuration:
|
||||
* STA_RTOS2_WATCHDOG_ENABLE: Enable module
|
||||
* STA_RTOS2_WATCHDOG_TIMER_PERIOD: Set period in ticks of heartbeat timer (default: 1000)
|
||||
* STA_RTOS2_WATCHDOG_TIMER_HANDLE: Override variable name of heartbeat timer handle (default: heartbeatHandle)
|
||||
* STA_RTOS2_WATCHDOG_TIMER_CALLBACK: Override name of heartbeat timer callback function (default: heartbeatCallback)
|
||||
* STA_RTOS2_WATCHDOG_HANDLE: Override variable name of watchdog task handle (default: watchdogHandle)
|
||||
* STA_RTOS2_WATCHDOG_ENTRY_FUNCTION: Override name of watchdog task entry function (default: watchdogTask)
|
||||
*/
|
||||
#ifndef STA_RTOS2_WATCHDOG_HPP
|
||||
#define STA_RTOS2_WATCHDOG_HPP
|
||||
|
||||
/**
|
||||
* @defgroup rtos2Watchdog Watchdog task
|
||||
* @ingroup rtos2API
|
||||
* @brief Watchdog system task.
|
||||
*
|
||||
* Check @ref rtos2BuildConfig for configuration options.
|
||||
*/
|
||||
|
||||
#ifdef DOXYGEN
|
||||
/**
|
||||
* @brief Enable module.
|
||||
*
|
||||
* @ingroup rtos2BuildConfig
|
||||
*/
|
||||
# define STA_RTOS2_WATCHDOG_ENABLE
|
||||
#endif // DOXYGEN
|
||||
|
||||
|
||||
/**
|
||||
* @def STA_RTOS2_WATCHDOG_TIMER_PERIOD
|
||||
* @brief Set period in ticks of heartbeat timer.
|
||||
*
|
||||
* @ingroup rtos2BuildConfig
|
||||
*/
|
||||
#ifndef STA_RTOS2_WATCHDOG_TIMER_PERIOD
|
||||
# define STA_RTOS2_WATCHDOG_TIMER_PERIOD 1000
|
||||
#endif // !STA_RTOS2_WATCHDOG_TIMER_PERIOD
|
||||
|
||||
/**
|
||||
* @def STA_RTOS2_WATCHDOG_TIMER_HANDLE
|
||||
* @brief Set variable name of heartbeat timer handle.
|
||||
*
|
||||
* @ingroup rtos2BuildConfig
|
||||
*/
|
||||
#ifndef STA_RTOS2_WATCHDOG_TIMER_HANDLE
|
||||
# define STA_RTOS2_WATCHDOG_TIMER_HANDLE heartbeatHandle
|
||||
#endif // !STA_RTOS2_WATCHDOG_TIMER_HANDLE
|
||||
|
||||
/**
|
||||
* @def STA_RTOS2_WATCHDOG_TIMER_CALLBACK
|
||||
* @brief Set name of heartbeat timer callback function.
|
||||
*
|
||||
* @ingroup rtos2BuildConfig
|
||||
*/
|
||||
#ifndef STA_RTOS2_WATCHDOG_TIMER_CALLBACK
|
||||
# define STA_RTOS2_WATCHDOG_TIMER_CALLBACK heartbeatCallback
|
||||
#endif // !STA_RTOS2_WATCHDOG_TIMER_CALLBACK
|
||||
|
||||
/**
|
||||
* @def STA_RTOS2_WATCHDOG_HANDLE
|
||||
* @brief Set variable name of watchdog task handle.
|
||||
*
|
||||
* @ingroup rtos2BuildConfig
|
||||
*/
|
||||
#ifndef STA_RTOS2_WATCHDOG_HANDLE
|
||||
# define STA_RTOS2_WATCHDOG_HANDLE watchdogHandle
|
||||
#endif // !STA_RTOS2_WATCHDOG_HANDLE
|
||||
|
||||
/**
|
||||
* @def STA_RTOS2_WATCHDOG_ENTRY_FUNCTION
|
||||
* @brief Set name of watchdog task entry function.
|
||||
*
|
||||
* @ingroup rtos2BuildConfig
|
||||
*/
|
||||
#ifndef STA_RTOS2_WATCHDOG_ENTRY_FUNCTION
|
||||
# define STA_RTOS2_WATCHDOG_ENTRY_FUNCTION watchdogTask
|
||||
#endif // !STA_RTOS2_WATCHDOG_ENTRY_FUNCTION
|
||||
|
||||
|
||||
#include <sta/config.hpp>
|
||||
#ifdef STA_RTOS2_WATCHDOG_ENABLE
|
||||
|
||||
@@ -21,6 +83,11 @@
|
||||
// Watchdog task flags
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief Watchdog heartbeat flag.
|
||||
*
|
||||
* @ingroup rtos2Watchdog
|
||||
*/
|
||||
#define STA_WATCHDOG_FLAG_HEARTBEAT 0x00001000U
|
||||
|
||||
|
||||
@@ -28,10 +95,14 @@ namespace sta
|
||||
{
|
||||
/**
|
||||
* @brief Start heartbeat timer for watchdog.
|
||||
*
|
||||
* @ingroup rtos2Watchdog
|
||||
*/
|
||||
void startWatchdogTimer();
|
||||
/**
|
||||
* @brief Send notification to watchdog task.
|
||||
*
|
||||
* @ingroup rtos2Watchdog
|
||||
*/
|
||||
void notifyWatchdog(uint32_t flags);
|
||||
} // namespace sta
|
||||
|
||||
Reference in New Issue
Block a user