mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-08-06 11:07:34 +00:00
Simplify system watchdog API
This commit is contained in:
@@ -5,8 +5,6 @@
|
||||
#ifndef STA_RTOS_SYSTEM_WATCHDOG_HPP
|
||||
#define STA_RTOS_SYSTEM_WATCHDOG_HPP
|
||||
|
||||
#include <sta/rtos/system/names.hpp>
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup STA_RTOS_Watchdog Watchdog task
|
||||
@@ -37,61 +35,10 @@
|
||||
#endif // !STA_RTOS_WATCHDOG_TIMER_PERIOD
|
||||
|
||||
|
||||
/**
|
||||
* @def STA_RTOS_WATCHDOG_TIMER_NAME
|
||||
* @brief Set name of watchdog timer.
|
||||
*
|
||||
* @ingroup STA_RTOS_BuildConfig
|
||||
*/
|
||||
#ifndef STA_RTOS_WATCHDOG_TIMER_NAME
|
||||
# define STA_RTOS_WATCHDOG_TIMER_NAME heartbeat
|
||||
#endif // !STA_RTOS_WATCHDOG_TIMER_NAME
|
||||
|
||||
/**
|
||||
* @def STA_RTOS_WATCHDOG_TIMER_HANDLE
|
||||
* @brief Set variable name of heartbeat timer handle.
|
||||
*
|
||||
* @ingroup STA_RTOS_BuildConfig
|
||||
*/
|
||||
#ifndef STA_RTOS_WATCHDOG_TIMER_HANDLE
|
||||
# define STA_RTOS_WATCHDOG_TIMER_HANDLE STA_RTOS_MAKE_HANDLE_NAME(STA_RTOS_WATCHDOG_TIMER_NAME)
|
||||
#endif // !STA_RTOS_WATCHDOG_TIMER_HANDLE
|
||||
|
||||
/**
|
||||
* @def STA_RTOS_WATCHDOG_TIMER_CALLBACK
|
||||
* @brief Set name of heartbeat timer callback function.
|
||||
*
|
||||
* @ingroup STA_RTOS_BuildConfig
|
||||
*/
|
||||
#ifndef STA_RTOS_WATCHDOG_TIMER_CALLBACK
|
||||
# define STA_RTOS_WATCHDOG_TIMER_CALLBACK STA_RTOS_MAKE_CALLBACK_NAME(STA_RTOS_WATCHDOG_TIMER_NAME)
|
||||
#endif // !STA_RTOS_WATCHDOG_TIMER_CALLBACK
|
||||
|
||||
|
||||
/**
|
||||
* @def STA_RTOS_WATCHDOG_TASK_NAME
|
||||
* @brief Set name of watchdog task.
|
||||
*
|
||||
* @ingroup STA_RTOS_BuildConfig
|
||||
*/
|
||||
#ifndef STA_RTOS_WATCHDOG_TASK_NAME
|
||||
# define STA_RTOS_WATCHDOG_TASK_NAME watchdog
|
||||
#endif // !STA_RTOS_WATCHDOG_TASK_NAME
|
||||
|
||||
/**
|
||||
* @def STA_RTOS_WATCHDOG_ENTRY_FUNCTION
|
||||
* @brief Set name of watchdog task entry function.
|
||||
*
|
||||
* @ingroup STA_RTOS_BuildConfig
|
||||
*/
|
||||
#ifndef STA_RTOS_WATCHDOG_ENTRY_FUNCTION
|
||||
# define STA_RTOS_WATCHDOG_ENTRY_FUNCTION STA_RTOS_MAKE_ENTRY_NAME(STA_RTOS_WATCHDOG_TASK_NAME)
|
||||
#endif // !STA_RTOS_WATCHDOG_ENTRY_FUNCTION
|
||||
|
||||
|
||||
#include <sta/config.hpp>
|
||||
#ifdef STA_RTOS_WATCHDOG_ENABLE
|
||||
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
@@ -111,11 +58,12 @@ namespace sta
|
||||
namespace rtos
|
||||
{
|
||||
/**
|
||||
* @brief Start heartbeat timer for watchdog.
|
||||
* @brief Initialize system watchdog.
|
||||
*
|
||||
* @ingroup STA_RTOS_Watchdog
|
||||
*/
|
||||
void startWatchdogTimer();
|
||||
void initWatchdog();
|
||||
|
||||
/**
|
||||
* @brief Send notification to watchdog task.
|
||||
*
|
||||
|
Reference in New Issue
Block a user