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: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
16 lines
276 B
YAML
16 lines
276 B
YAML
# Copyright (c) 2022 Intel Corp.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
description: Test string token property container
|
|
|
|
compatible: "vnd,string-token"
|
|
|
|
properties:
|
|
val:
|
|
type: string
|
|
required: false
|
|
enum:
|
|
- token_zero
|
|
- token_one
|
|
- token_two
|