diff --git a/include/sta/rtos2/defs.hpp b/include/sta/rtos2/defs.hpp index 114940c..0fd9fb7 100644 --- a/include/sta/rtos2/defs.hpp +++ b/include/sta/rtos2/defs.hpp @@ -13,7 +13,7 @@ /** * @defgroup rtos2API API * @ingroup rtos2 - * @brief Public library interface. + * @brief Public interface. */ /** @@ -29,10 +29,22 @@ */ // See limits defined in cmsis_os2.c -#define STA_RTOS2_MAX_BITS_TASK_NOTIFY 31U -#define STA_RTOS2_MAX_BITS_EVENT_GROUPS 24U +/** + * @brief Number of usable bits in task notification flags. + */ +#define STA_RTOS2_MAX_BITS_TASK_NOTIFY 31U +/** + * @brief Number of usable bits in event group flags. + */ +#define STA_RTOS2_MAX_BITS_EVENT_GROUPS 24U +/** + * @brief Mask for valid task notification flag bits. + */ #define STA_RTOS2_THREAD_FLAGS_VALID_BITS ((1UL << STA_RTOS2_MAX_BITS_TASK_NOTIFY) - 1U) +/** + * @brief Mask for valid event group flag bits. + */ #define STA_RTOS2_EVENT_FLAGS_VALID_BITS ((1UL << STA_RTOS2_MAX_BITS_EVENT_GROUPS) - 1U) diff --git a/include/sta/rtos2/watchdog.hpp b/include/sta/rtos2/watchdog.hpp index d155e94..07abfc2 100644 --- a/include/sta/rtos2/watchdog.hpp +++ b/include/sta/rtos2/watchdog.hpp @@ -105,6 +105,17 @@ namespace sta * @ingroup rtos2Watchdog */ void notifyWatchdog(uint32_t flags); + + + /** + * @brief Handler for watchdog events. + * + * Must be implemented by application. + * + * @param arg Watchdog task argument + * @param flags Event flags + */ + void watchdogEventHandler(void * arg, uint32_t flags); } // namespace sta diff --git a/src/rtos2/watchdog/watchdog.cpp b/src/rtos2/watchdog/watchdog.cpp index a502501..3a3ddf7 100644 --- a/src/rtos2/watchdog/watchdog.cpp +++ b/src/rtos2/watchdog/watchdog.cpp @@ -20,10 +20,6 @@ namespace sta { osThreadFlagsSet(STA_RTOS2_WATCHDOG_HANDLE, flags); } - - - // Handler for watchdog events - extern void watchdogEventHandler(void * arg, uint32_t flags); } // namespace sta