Skip to content
Commit c1c82b75 authored by Peter Bigot's avatar Peter Bigot Committed by Kumar Gala
Browse files

scripts: dts: generate array values as initializer lists



Simplify use of property values that have multiple elements by
providing all of them in an initializer list, in addition to each one
as an enumerated value.

For example if a driver requires a sequence of operations with
instance-specific delays between stages the durations can be specified
with:

    delays = <30000 20 45000>;

and the driver can use:

    static u32_t delays[] = DT_INST_0_COMPAT_DELAYS;

rather than enumerating the instances.  This is particularly useful
when the number of entries in the array varies per instance, in which
case such an initialization is not easily expressed in code.

Signed-off-by: default avatarPeter A. Bigot <pab@pabigot.com>
parent aefe9413
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment