Macro Processing Helpers#

Helper macros for token concatenation and argument processing.

These macros provide the foundation for the variadic logging system, enabling automatic selection of appropriate logging functions based on argument count and generating unique identifiers.

Macros#

#define

Generate unique name based on line number.

#define
SLI_LOG_COUNT_ARGS_IMPL (_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...)

Implementation macro for counting variadic arguments (up to 10)

#define

Count the number of variadic arguments (up to 10)

#define

Helper for choosing logging macro based on argument count.

#define

Macro dispatcher for selecting appropriate logging function.

#define

Macro dispatcher for selecting appropriate logging function.

#define

Macro dispatcher for selecting appropriate logging function.

#define

Chooser for SL_PRINT_EVENT_* -> SEGGER_SYSVIEW_RecordU32 / RecordU32xN.

#define

Chooser for SL_PRINT_EVENT_* -> SEGGER_SYSVIEW_RecordU32 / RecordU32xN.

Macro Definition Documentation#

SLI_LOG_UNIQUE_NAME#

#define SLI_LOG_UNIQUE_NAME
Value:
(base)

Generate unique name based on line number.


SLI_LOG_COUNT_ARGS_IMPL#

#define SLI_LOG_COUNT_ARGS_IMPL
Value:
(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...)

Implementation macro for counting variadic arguments (up to 10)


SLI_LOG_COUNT_ARGS#

#define SLI_LOG_COUNT_ARGS
Value:
(fmt, ...)

Count the number of variadic arguments (up to 10)


SLI_LOG_MACRO_CHOOSER2#

#define SLI_LOG_MACRO_CHOOSER2
Value:
(count)

Helper for choosing logging macro based on argument count.


SLI_LOG_VOID_MACRO_CHOOSER2#

#define SLI_LOG_VOID_MACRO_CHOOSER2
Value:
(count)

Macro dispatcher for selecting appropriate logging function.


SLI_LOG_VOID_MACRO_CHOOSER1#

#define SLI_LOG_VOID_MACRO_CHOOSER1
Value:
(count)

Macro dispatcher for selecting appropriate logging function.


SLI_LOG_MACRO_CHOOSER1#

#define SLI_LOG_MACRO_CHOOSER1
Value:
(count)

Macro dispatcher for selecting appropriate logging function.


SLI_LOG_EVENT_MACRO_CHOOSER2#

#define SLI_LOG_EVENT_MACRO_CHOOSER2
Value:
(count)

Chooser for SL_PRINT_EVENT_* -> SEGGER_SYSVIEW_RecordU32 / RecordU32xN.


SLI_LOG_EVENT_MACRO_CHOOSER1#

#define SLI_LOG_EVENT_MACRO_CHOOSER1
Value:
(count)

Chooser for SL_PRINT_EVENT_* -> SEGGER_SYSVIEW_RecordU32 / RecordU32xN.