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
@@ -11,11 +11,12 @@
#include <stdio.h>
#include <time.h>
#include "board.h"
#include "daq.h"
#include "helper.h"
#include "mcu.h"
#if DT_NODE_EXISTS(DT_CHILD(DT_PATH(outputs), pwm_switch))
#if BOARD_HAS_PWM_PORT
#ifndef UNIT_TEST
@@ -161,4 +162,4 @@ bool pwm_active() { return false; }
#endif
#endif /* DT_NODE_EXISTS(DT_CHILD(DT_PATH(outputs), pwm_switch)) */
#endif /* BOARD_HAS_PWM_PORT */