Skip to content
Commit 99644146 authored by Bernardo Perez Priego's avatar Bernardo Perez Priego Committed by Marti Bolivar
Browse files

include/devicetree.h: Add DT_STRING_TOKEN_OR macro



This macro expands to DT_STRING_TOKEN if property exists, otherwise
falls back to default value.
Helpful when a non-required enum binding doesn't mention a default
value, but a default value makes sense to be set in the code.

Including DT_INST_STRING_TOKEN_OR and test code.

Signed-off-by: default avatarBernardo Perez Priego <bernardo.perez.priego@intel.com>
parent b4dfdb5a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment