nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches

◆ IF_ENABLED_ANY

#define IF_ENABLED_ANY ( _flags,
... )

#include <include/util/util_macro.h>

Value:
Z_IF_ENABLED_ANY((__VA_ARGS__), __DEBRACKET _flags)
#define Z_IF_ENABLED_ANY(_code,...)
Definition util_internal.h:167

Insert code if any _flags are defined to 1.

Like IF_ENABLED(), this emits code if any _flags are defined to 1; it expands to nothing otherwise.

Example:

IF_ENABLED_ANY((CONFIG_FOO, CONFIG_BAR), uint32_t foo;)

If CONFIG_FOO or CONFIG_BAR defined to 1, this expands to:

uint32_t foo;

and to nothing otherwise.

Parameters
_flagsevaluated flags; must be in parentheses
...Emitted code if any _flags expands to 1