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>
This commit is contained in:
parent
6b05121e65
commit
9b43ac7c76
1 changed files with 21 additions and 0 deletions
21
include/dt-bindings/dt-util.h
Normal file
21
include/dt-bindings/dt-util.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* 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_ */
|
Loading…
Add table
Add a link
Reference in a new issue