zephyr/include/dt-bindings/dt-util.h
Gerson Fernando Budke 9b43ac7c76 include: dt-bindings: Add macros entry point for DTS preprocessor
Introduce <dt-bindings/dt-util.h> file.  It wraps <sys/util_macro.h>
file exposing all macro base definitions to DTS preprocessor.  Once it
contains only prepocessor macros, it can be safely included in DTS,
similar way the <dts/arm/<manufacturer>/pinctrl_<manufacturer>_<soc>.h
files are included.

This provides necessary background to elaborate complex constructions
like variable length macros with zero or more elements.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-10-23 09:38:55 -05:00

21 lines
671 B
C

/*
* Copyright (c) 2020 Gerson Fernando Budke <nandojve@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_DT_UTIL_H_
#define ZEPHYR_INCLUDE_DT_BINDINGS_DT_UTIL_H_
/*
* This file exists to keep in-tree DTS clean. This means, only
* #include <dt-bindings/foo.h> form should be included. The
* <dt-bindings/dt-util.h> wraps <sys/util_macro.h> file exposing
* all macro base definitions to DTS preprocessor. It provides
* necessary background to elaborate complex constructions like
* variable length macros with zero or more elements.
*/
#include <sys/util_macro.h>
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_DT_UTIL_H_ */