File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 25
25
#include <zephyr/sys/util.h>
26
26
#include <zephyr/offsets.h>
27
27
28
- /* We need to dummy out DT_NODE_HAS_STATUS when building the unittests.
28
+ /* We need to dummy out DT_NODE_HAS_STATUS and DT_NODE_HAS_STATUS_OKAY when
29
+ * building the unittests.
29
30
* Including devicetree.h would require generating dummy header files
30
31
* to match what gen_defines creates, so it's easier to just dummy out
31
- * DT_NODE_HAS_STATUS. These are undefined at the end of the file.
32
+ * DT_NODE_HAS_STATUS and DT_NODE_HAS_STATUS_OKAY. These are undefined at the
33
+ * end of the file.
32
34
*/
33
35
#ifdef ZTEST_UNITTEST
36
+ #ifdef DT_NODE_HAS_STATUS
37
+ #undef DT_NODE_HAS_STATUS
38
+ #endif
34
39
#define DT_NODE_HAS_STATUS (node , status ) 0
40
+
41
+ #ifdef DT_NODE_HAS_STATUS_OKAY
42
+ #undef DT_NODE_HAS_STATUS_OKAY
43
+ #endif
35
44
#define DT_NODE_HAS_STATUS_OKAY (node ) 0
36
45
#else
37
46
#include <zephyr/devicetree.h>
You can’t perform that action at this time.
0 commit comments