forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devicetree: make DT_PROP_HAS_IDX expand to 0 or 1
We have a use case for checking the results of a DT_PROP_HAS_IDX() call with COND_CODE_1(). That won't work because its expansion is an integer comparison; COND_CODE_1() expects a literal 1 or 0. Adjust the macro implementation so it expands to a literal 1 or 0. Make this work even when the index argument needs an expansion while we're at it. Fixes: zephyrproject-rtos#29833 Signed-off-by: Martí Bolívar <[email protected]>
- Loading branch information
1 parent
6221439
commit 07faa4d
Showing
3 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters