From 160f587ee1e64453a95044f465c0e7c6c2aa0305 Mon Sep 17 00:00:00 2001 From: Henrik Stickann <4376396-Mithradir@users.noreply.gitlab.com> Date: Tue, 24 May 2022 14:00:46 +0200 Subject: [PATCH] Move name macros to separate header --- include/sta/rtos/easy_config.hpp | 10 +++------- include/sta/rtos/system/names.hpp | 12 ++++++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 include/sta/rtos/system/names.hpp diff --git a/include/sta/rtos/easy_config.hpp b/include/sta/rtos/easy_config.hpp index 6459e6f..3bf8c64 100644 --- a/include/sta/rtos/easy_config.hpp +++ b/include/sta/rtos/easy_config.hpp @@ -5,6 +5,9 @@ #ifndef STA_RTOS_EASY_CONFIG_HPP #define STA_RTOS_EASY_CONFIG_HPP +#include + + /** * @defgroup STA_RTOS_EasyConfig Easy Config * @ingroup STA_RTOS_BuildConfig @@ -46,13 +49,6 @@ #endif // STA_RTOS_EASY_CONFIG_SYSTEM_TASKS_ENABLE -#define _STA_RTOS_CONCAT(a, b) a ## b - -#define STA_RTOS_MAKE_HANDLE_NAME(name) _STA_RTOS_CONCAT(name, Handle) -#define STA_RTOS_MAKE_CALLBACK_NAME(name) _STA_RTOS_CONCAT(name, Callback) -#define STA_RTOS_MAKE_TASK_NAME(name) _STA_RTOS_CONCAT(name, Task) - - #ifdef DOXYGEN /** * @brief Common base name used for watchdog timer handle and callback names. diff --git a/include/sta/rtos/system/names.hpp b/include/sta/rtos/system/names.hpp new file mode 100644 index 0000000..d123dae --- /dev/null +++ b/include/sta/rtos/system/names.hpp @@ -0,0 +1,12 @@ +#ifndef STA_RTOS_SYSTEM_NAMES_HPP +#define STA_RTOS_SYSTEM_NAMES_HPP + + +#define _STA_RTOS_CONCAT(a, b) a ## b + +#define STA_RTOS_MAKE_HANDLE_NAME(name) _STA_RTOS_CONCAT(name, Handle) +#define STA_RTOS_MAKE_CALLBACK_NAME(name) _STA_RTOS_CONCAT(name, Callback) +#define STA_RTOS_MAKE_ENTRY_NAME(name) _STA_RTOS_CONCAT(name, Task) + + +#endif // STA_RTOS_SYSTEM_NAMES_HPP