Skip to content

Group logging_macros

Modules > logging_macros

Macros

Type Name
define FLT_FMT (_n) [**STRINGIZE**](group__logging__macros.md#define-stringize)([**PPCAT**](group__logging__macros.md#define-ppcat)([**PPCAT**](group__logging__macros.md#define-ppcat)(%c%d.%0, \_n), d))
define FLT_FMT3 [**FLT\_FMT**](group__logging__macros.md#define-flt_fmt)(3)
define FLT_VAR (_n, _x) /* multi line expression */
define FLT_VAR3 (_x) [**FLT\_VAR**](group__logging__macros.md#define-flt_var)(3, \_x)
define LOGGER_BUFFER 128
define LOGGER_NEWLINE "\r\n"
define PPCAT (A, B) [**PPCAT\_NX**](group__logging__macros.md#define-ppcat_nx)(A, B)
define PPCAT_NX (A, B) A##B
define STRINGIZE (A) [**STRINGIZE\_NX**](group__logging__macros.md#define-stringize_nx)(A)
define STRINGIZE_NX (A) #A

Macro Definition Documentation

define FLT_FMT

#define FLT_FMT (
    _n
) `STRINGIZE ( PPCAT ( PPCAT (%c%d.%0, _n), d))`

Floating point output formatting string. Include in your printf-style format string example: printf("float value = " FLT_FMT(3) " continue like that", FLT_VAR(3, x));


define FLT_FMT3

#define FLT_FMT3 `FLT_FMT (3)`

Shorthand for 10^-3 fraction, output equivalent to %.3f


define FLT_VAR

#define FLT_VAR (
    _n,
    _x
) `/* multi line expression */`

Floating point output variable preprocessing Note: uses truncation instead of rounding -> the last digit may be off


define FLT_VAR3

#define FLT_VAR3 (
    _x
) `FLT_VAR (3, _x)`

Shorthand for 10^-3 fraction


define LOGGER_BUFFER

#define LOGGER_BUFFER `128`

size in bytes


define LOGGER_NEWLINE

#define LOGGER_NEWLINE `"\r\n"`

Logger configuration custom newline character sequence


define PPCAT

#define PPCAT (
    A,
    B
) `PPCAT_NX (A, B)`

concatenate tokens


define PPCAT_NX

#define PPCAT_NX (
    A,
    B
) `A##B`

Helper macros for string concatenation and macro expansion non-expanding concatenation


define STRINGIZE

#define STRINGIZE (
    A
) `STRINGIZE_NX (A)`

make a string


define STRINGIZE_NX

#define STRINGIZE_NX (
    A
) `#A`

non-expanding stringize