mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-08-06 03:07:33 +00:00
Rename WATCHDOG macros to SYSTEM_WATCHDOG
This commit is contained in:
@@ -20,23 +20,23 @@
|
|||||||
*
|
*
|
||||||
* @ingroup STA_RTOS_BuildConfig
|
* @ingroup STA_RTOS_BuildConfig
|
||||||
*/
|
*/
|
||||||
# define STA_RTOS_WATCHDOG_ENABLE
|
# define STA_RTOS_SYSTEM_WATCHDOG_ENABLE
|
||||||
#endif // DOXYGEN
|
#endif // DOXYGEN
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def STA_RTOS_WATCHDOG_TIMER_PERIOD
|
* @def STA_RTOS_SYSTEM_WATCHDOG_TIMER_PERIOD
|
||||||
* @brief Set period in ticks of heartbeat timer.
|
* @brief Set period in ticks of heartbeat timer.
|
||||||
*
|
*
|
||||||
* @ingroup STA_RTOS_BuildConfig
|
* @ingroup STA_RTOS_BuildConfig
|
||||||
*/
|
*/
|
||||||
#ifndef STA_RTOS_WATCHDOG_TIMER_PERIOD
|
#ifndef STA_RTOS_SYSTEM_WATCHDOG_TIMER_PERIOD
|
||||||
# define STA_RTOS_WATCHDOG_TIMER_PERIOD 1000
|
# define STA_RTOS_SYSTEM_WATCHDOG_TIMER_PERIOD 1000
|
||||||
#endif // !STA_RTOS_WATCHDOG_TIMER_PERIOD
|
#endif // !STA_RTOS_SYSTEM_WATCHDOG_TIMER_PERIOD
|
||||||
|
|
||||||
|
|
||||||
#include <sta/config.hpp>
|
#include <sta/config.hpp>
|
||||||
#ifdef STA_RTOS_WATCHDOG_ENABLE
|
#ifdef STA_RTOS_SYSTEM_WATCHDOG_ENABLE
|
||||||
|
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
@@ -87,6 +87,6 @@ namespace sta
|
|||||||
} // namespace sta
|
} // namespace sta
|
||||||
|
|
||||||
|
|
||||||
#endif // STA_RTOS_WATCHDOG_ENABLE
|
#endif // STA_RTOS_SYSTEM_WATCHDOG_ENABLE
|
||||||
|
|
||||||
#endif // STA_RTOS_SYSTEM_WATCHDOG_HPP
|
#endif // STA_RTOS_SYSTEM_WATCHDOG_HPP
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#include <sta/rtos/system/watchdog.hpp>
|
#include <sta/rtos/system/watchdog.hpp>
|
||||||
#ifdef STA_RTOS_WATCHDOG_ENABLE
|
#ifdef STA_RTOS_SYSTEM_WATCHDOG_ENABLE
|
||||||
|
|
||||||
#include <sta/assert.hpp>
|
#include <sta/assert.hpp>
|
||||||
#include <sta/lang.hpp>
|
#include <sta/lang.hpp>
|
||||||
@@ -60,7 +60,7 @@ namespace sta
|
|||||||
|
|
||||||
watchdogTimerHandle = osTimerNew(watchdogTimerCallback, osTimerPeriodic, nullptr, &timerAttributes);
|
watchdogTimerHandle = osTimerNew(watchdogTimerCallback, osTimerPeriodic, nullptr, &timerAttributes);
|
||||||
STA_ASSERT_MSG(watchdogTimerHandle != nullptr, "System watchdog timer initialization failed");
|
STA_ASSERT_MSG(watchdogTimerHandle != nullptr, "System watchdog timer initialization failed");
|
||||||
osTimerStart(watchdogTimerHandle, STA_RTOS_WATCHDOG_TIMER_PERIOD);
|
osTimerStart(watchdogTimerHandle, STA_RTOS_SYSTEM_WATCHDOG_TIMER_PERIOD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -100,4 +100,4 @@ void watchdogTimerCallback(void *)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // STA_RTOS_WATCHDOG_ENABLE
|
#endif // STA_RTOS_SYSTEM_WATCHDOG_ENABLE
|
||||||
|
Reference in New Issue
Block a user