Use BOARD_HAS_* macro to identify key hardware features

These macros replace the direct use of DT_ macros in many locations and make
the code more readable.
This commit is contained in:
Martin Jäger
2021-02-04 17:28:52 +01:00
parent 830315cda0
commit 4eaf89154a
15 changed files with 113 additions and 82 deletions
+3 -2
View File
@@ -7,8 +7,9 @@
#include "load.h"
#include <zephyr.h>
#include "board.h"
#if DT_NODE_EXISTS(DT_CHILD(DT_PATH(outputs), load)) || UNIT_TEST
#if BOARD_HAS_LOAD_OUTPUT || UNIT_TEST
#include "leds.h"
#include "device_status.h"
@@ -171,4 +172,4 @@ void load_short_circuit_stop()
load.stop(ERR_LOAD_SHORT_CIRCUIT);
}
#endif /* DT_NODE_EXISTS(DT_CHILD(DT_PATH(outputs), load)) */
#endif /* BOARD_HAS_LOAD_OUTPUT */