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

◆ IF_ENABLED_ALL

#define IF_ENABLED_ALL ( _flags,
... )

#include <include/util/util_macro.h>

Value:
Z_IF_ENABLED_ALL((__VA_ARGS__), __DEBRACKET _flags)
#define Z_IF_ENABLED_ALL(_code,...)
Definition util_internal.h:96

Insert code if all _flags are defined and equals 1.

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

Example:

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

If CONFIG_FOO and CONFIG_BAR are defined to 1, this expands to:

uint32_t foo;

and to nothing otherwise.

Parameters
_flagsevaluated flags; must be in parentheses
...Emitted code if all _flags are defined to 1