Skip to content
Commit 345da78b authored by Peter Bigot's avatar Peter Bigot Committed by Anas Nashif
Browse files

devicetree: basic support for enum tokens



Whenever a devicetree binding defines a string property whose
enumerated values are all tokenizable, generate C macros for each
property value that are the corresponding tokens.

Note that "token" is distinct from "identifier": both 'foo' and '123'
are valid tokens, but only 'foo' is a valid identifier. We permit some
strings which are not valid identifiers in anticipation that the
generalization may be useful, e.g. when defining macros that paste the
token onto a prefix that makes the whole thing an identifier.

Fixes: #21273
Signed-off-by: default avatarPeter Bigot <peter.bigot@nordicsemi.no>
Signed-off-by: default avatarMartí Bolívar <marti.bolivar@nordicsemi.no>
parent b6dc0a24
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment