Lines Matching +full:1 +full:- +full:a
2 * Copyright (c) 2011-2014, Wind River Systems, Inc.
5 * SPDX-License-Identifier: Apache-2.0
22 /* This is called from IS_ENABLED(), and sticks on a "_XXXX" prefix,
23 * it will now be "_XXXX1" if config_macro is "1", or just "_XXXX" if it's
30 /* Here's the core trick, we map "_XXXX1" to "_YYYY," (i.e. a string
31 * with a trailing comma), so it has the effect of making this a
32 * two-argument tuple to the preprocessor only in the case where the
33 * value is defined to "1"
34 * ENABLED: _YYYY, <--- note comma!
40 * accepting it as a varargs macro.
42 * ENABLED: Z_IS_ENABLED3(_YYYY, 1, 0)
43 * DISABLED Z_IS_ENABLED3(_XXXX 1, 0)
45 #define Z_IS_ENABLED2(one_or_two_args) Z_IS_ENABLED3(one_or_two_args 1, 0)
47 /* And our second argument is thus now cooked to be 1 in the case
48 * where the value is defined to 1, and 0 if not:
52 /* Implementation of IS_EQ(). Returns 1 if _0 and _1 are the same integer from
71 /* Used to remove brackets from around a single argument. */
75 /* reference: https://gustedt.wordpress.com/2010/06/08/detect-empty-macro-arguments/ */
77 NUM_VA_ARGS_LESS_1_IMPL(__VA_ARGS__, 1, 1, 1, 1, 1, 1, 1, 1, \
78 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
79 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
80 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0)
100 #define Z_LIST_DROP_FIRST(...) GET_ARGS_LESS_N(1, __VA_ARGS__)
104 #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__) argument
105 #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__ argument
109 #define UTIL_NOT_0 ~, 1,
111 #define UTIL_COMPL_0 1
145 #define MACRO_MC_1(m, a, ...) m(a) argument
146 #define MACRO_MC_2(m, a, ...) UTIL_CAT(m(a), MACRO_MC_1(m, __VA_ARGS__,)) argument
147 #define MACRO_MC_3(m, a, ...) UTIL_CAT(m(a), MACRO_MC_2(m, __VA_ARGS__,)) argument
148 #define MACRO_MC_4(m, a, ...) UTIL_CAT(m(a), MACRO_MC_3(m, __VA_ARGS__,)) argument
149 #define MACRO_MC_5(m, a, ...) UTIL_CAT(m(a), MACRO_MC_4(m, __VA_ARGS__,)) argument
150 #define MACRO_MC_6(m, a, ...) UTIL_CAT(m(a), MACRO_MC_5(m, __VA_ARGS__,)) argument
151 #define MACRO_MC_7(m, a, ...) UTIL_CAT(m(a), MACRO_MC_6(m, __VA_ARGS__,)) argument
152 #define MACRO_MC_8(m, a, ...) UTIL_CAT(m(a), MACRO_MC_7(m, __VA_ARGS__,)) argument
153 #define MACRO_MC_9(m, a, ...) UTIL_CAT(m(a), MACRO_MC_8(m, __VA_ARGS__,)) argument
154 #define MACRO_MC_10(m, a, ...) UTIL_CAT(m(a), MACRO_MC_9(m, __VA_ARGS__,)) argument
155 #define MACRO_MC_11(m, a, ...) UTIL_CAT(m(a), MACRO_MC_10(m, __VA_ARGS__,)) argument
156 #define MACRO_MC_12(m, a, ...) UTIL_CAT(m(a), MACRO_MC_11(m, __VA_ARGS__,)) argument
157 #define MACRO_MC_13(m, a, ...) UTIL_CAT(m(a), MACRO_MC_12(m, __VA_ARGS__,)) argument
158 #define MACRO_MC_14(m, a, ...) UTIL_CAT(m(a), MACRO_MC_13(m, __VA_ARGS__,)) argument
159 #define MACRO_MC_15(m, a, ...) UTIL_CAT(m(a), MACRO_MC_14(m, __VA_ARGS__,)) argument
166 * GPIO_DT_RESERVED_RANGES_NGPIOS as a usage example)
169 EMPTY, 1, EMPTY, 3, EMPTY, 5, EMPTY, 7, \
180 * GPIO_DT_RESERVED_RANGES_NGPIOS as a usage example)