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
SLI_LOG_UNIQUE_NAME (base)

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
SLI_LOG_COUNT_ARGS (fmt, ...)

Count the number of variadic arguments (up to 10)

#define
SLI_LOG_MACRO_CHOOSER2 (count)

Helper for choosing logging macro based on argument count.

#define
SLI_LOG_VOID_MACRO_CHOOSER2 (count)

Macro dispatcher for selecting appropriate logging function.

#define
SLI_LOG_VOID_MACRO_CHOOSER1 (count)

Macro dispatcher for selecting appropriate logging function.

#define
SLI_LOG_MACRO_CHOOSER1 (count)

Macro dispatcher for selecting appropriate logging function.

#define
SLI_LOG_EVENT_MACRO_CHOOSER2 (count)

Chooser for SL_PRINT_EVENT_* -> SEGGER_SYSVIEW_RecordU32 / RecordU32xN.

#define
SLI_LOG_EVENT_MACRO_CHOOSER1 (count)

Chooser for SL_PRINT_EVENT_* -> SEGGER_SYSVIEW_RecordU32 / RecordU32xN.