Rename WATCHDOG macros to SYSTEM_WATCHDOG

This commit is contained in:
Henrik Stickann
2023-01-22 00:06:29 +01:00
parent 6b0f4dd84b
commit e4835cc57d
2 changed files with 10 additions and 10 deletions

View File

@@ -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

View File

@@ -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