![]() |
nRF Connect SDK API 3.3.99
|
| #define IS_ENABLED_ALL | ( | ... | ) |
#include <include/util/util_macro.h>
Check multiple macro definitions to see if all are set in compiler-visible expressions.
This utilizes the same methodology as IS_ENABLED but on an variable number of argument. It will resolve as true (1) if all of the arguments in the input are defined to 1.
Example usage:
if (IS_ENABLED_ALL(CONFIG_FOO, CONFIG_BAR)) {
do_something_if_all_of_these
}
This is cleaner since the compiler can generate errors and warnings for do_something_if_all_of_these even when CONFIG_FOO and/or CONFIG_BAR is undefined.
| ... | Arguments to check if all are defined to 1 |
... are defined to 1, otherwise 0