Skip to content
Commit 59167e18 authored by Jordan Yates's avatar Jordan Yates Committed by Marti Bolivar
Browse files

scripts: dts: gen_defines: add `ENUM_VAL_<val>_EXISTS` define



Add a define of the form
`DT_N_<node-id>_P_<prop-id>_ENUM_VAL_<val>_EXISTS` for enumerated
devicetree properties. This enables the devicetree API to check whether
an enum is a given value directly, without resorting to error-prone
checks against the enum index.

Example generated defines (int and string):
	`#define DT_N_S_test_S_enum_4_P_val_ENUM_VAL_5_EXISTS 1`
	`#define DT_N_S_test_S_enum_6_P_val_ENUM_VAL_zero_EXISTS 1`

Signed-off-by: default avatarJordan Yates <jordan.yates@data61.csiro.au>
parent c03e1900
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment